2020-10-18 00:46:57 +06:00
|
|
|
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2020-04-01 05:26:43 +06:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "quantum.h"
|
|
|
|
#include "oled_driver.h"
|
2022-01-22 09:36:52 +06:00
|
|
|
extern deferred_token kittoken;
|
2020-04-01 05:26:43 +06:00
|
|
|
|
2021-07-01 13:42:32 +06:00
|
|
|
void oled_driver_render_logo(void);
|
|
|
|
bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
|
|
|
|
oled_rotation_t oled_init_keymap(oled_rotation_t rotation);
|
2021-02-24 00:57:24 +06:00
|
|
|
extern uint32_t oled_timer;
|
2021-08-22 02:34:44 +06:00
|
|
|
void render_keylogger_status(void);
|
|
|
|
void render_default_layer_state(void);
|
|
|
|
void render_layer_state(void);
|
|
|
|
void render_keylock_status(uint8_t led_usb_state);
|
2022-01-31 03:20:33 +06:00
|
|
|
void render_matrix_scan_rate(uint8_t padding);
|
2021-08-22 02:34:44 +06:00
|
|
|
void render_mod_status(uint8_t modifiers);
|
|
|
|
void render_bootmagic_status(void);
|
|
|
|
void render_user_status(void);
|
|
|
|
void oled_driver_render_logo(void);
|
|
|
|
void render_wpm(uint8_t padding);
|
2022-01-31 03:20:33 +06:00
|
|
|
void render_pointing_dpi_status(uint16_t cpi, uint8_t padding);
|
2021-08-22 02:34:44 +06:00
|
|
|
void oled_driver_render_logo_left(void);
|
|
|
|
void oled_driver_render_logo_right(void);
|
2022-01-31 03:20:33 +06:00
|
|
|
void oled_render_large_display(void);
|
|
|
|
void render_wpm_graph(uint8_t max_lines_graph, uint8_t vertical_offset);
|
2020-04-01 05:26:43 +06:00
|
|
|
|
2022-01-22 09:36:52 +06:00
|
|
|
#if defined(OLED_DISPLAY_128X128) || defined(OLED_DISPLAY_128X64)
|
|
|
|
# define OLED_DISPLAY_VERBOSE
|
2021-07-01 13:42:32 +06:00
|
|
|
|
2022-01-22 09:36:52 +06:00
|
|
|
# define OLED_RENDER_KEYLOGGER "Keylogger: "
|
|
|
|
# ifndef OLED_KEYLOGGER_LENGTH
|
|
|
|
# define OLED_KEYLOGGER_LENGTH 9
|
|
|
|
# endif
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_LAYOUT_NAME "Layout: "
|
|
|
|
# define OLED_RENDER_LAYOUT_QWERTY "Qwerty"
|
2022-01-31 03:20:33 +06:00
|
|
|
# define OLED_RENDER_LAYOUT_COLEMAK_DH "Colemak DH"
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_LAYOUT_COLEMAK "Colemak"
|
|
|
|
# define OLED_RENDER_LAYOUT_DVORAK "Dvorak"
|
|
|
|
# define OLED_RENDER_LAYOUT_WORKMAN "Workman"
|
|
|
|
# define OLED_RENDER_LAYOUT_NORMAN "Norman"
|
|
|
|
# define OLED_RENDER_LAYOUT_MALTRON "Matron"
|
|
|
|
# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn"
|
|
|
|
# define OLED_RENDER_LAYOUT_CARPLAX "Carplax"
|
|
|
|
|
|
|
|
# define OLED_RENDER_LAYER_NAME "Layer:"
|
|
|
|
# define OLED_RENDER_LAYER_LOWER "Lower"
|
|
|
|
# define OLED_RENDER_LAYER_RAISE "Raise"
|
|
|
|
# define OLED_RENDER_LAYER_ADJUST "Adjust"
|
|
|
|
# define OLED_RENDER_LAYER_MODS "Mods"
|
|
|
|
|
|
|
|
# define OLED_RENDER_LOCK_NAME "Lock: "
|
2022-01-22 09:36:52 +06:00
|
|
|
# define OLED_RENDER_LOCK_NUML "NUM"
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_LOCK_CAPS "CAPS"
|
|
|
|
# define OLED_RENDER_LOCK_SCLK "SCLK"
|
|
|
|
|
2022-01-22 09:36:52 +06:00
|
|
|
# define OLED_RENDER_MODS_NAME "Mods"
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_MODS_SFT "Sft"
|
|
|
|
# define OLED_RENDER_MODS_CTL "Ctl"
|
|
|
|
# define OLED_RENDER_MODS_ALT "Alt"
|
|
|
|
# define OLED_RENDER_MODS_GUI "GUI"
|
|
|
|
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_NAME "Boot "
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
|
2021-05-25 22:24:01 +06:00
|
|
|
# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT"
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
|
2020-04-01 05:26:43 +06:00
|
|
|
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_USER_NAME "USER:"
|
|
|
|
# define OLED_RENDER_USER_ANIM "Anim"
|
|
|
|
# define OLED_RENDER_USER_LAYR "Layr"
|
|
|
|
# define OLED_RENDER_USER_NUKE "Nuke"
|
2020-04-01 05:26:43 +06:00
|
|
|
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_WPM_COUNTER "WPM: "
|
2020-04-01 05:26:43 +06:00
|
|
|
#else
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_KEYLOGGER "KLogr"
|
2022-01-22 09:36:52 +06:00
|
|
|
# ifndef OLED_KEYLOGGER_LENGTH
|
|
|
|
# define OLED_KEYLOGGER_LENGTH 5
|
|
|
|
# endif
|
2021-07-01 13:42:32 +06:00
|
|
|
|
|
|
|
# define OLED_RENDER_LAYOUT_NAME "Lyout"
|
|
|
|
# define OLED_RENDER_LAYOUT_QWERTY " QRTY"
|
2021-07-27 06:59:49 +06:00
|
|
|
# define OLED_RENDER_LAYOUT_COLEMAK_DH " cmDH"
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_LAYOUT_COLEMAK " COLE"
|
|
|
|
# define OLED_RENDER_LAYOUT_DVORAK " DVRK"
|
|
|
|
# define OLED_RENDER_LAYOUT_WORKMAN " WKMN"
|
|
|
|
# define OLED_RENDER_LAYOUT_NORMAN " NORM"
|
|
|
|
# define OLED_RENDER_LAYOUT_MALTRON " MLTN"
|
|
|
|
# define OLED_RENDER_LAYOUT_EUCALYN " ECLN"
|
|
|
|
# define OLED_RENDER_LAYOUT_CARPLAX " CRPX"
|
|
|
|
|
|
|
|
# define OLED_RENDER_LAYER_NAME "LAYER"
|
|
|
|
# define OLED_RENDER_LAYER_LOWER "Lower"
|
|
|
|
# define OLED_RENDER_LAYER_RAISE "Raise"
|
|
|
|
# define OLED_RENDER_LAYER_ADJUST "Adjst"
|
|
|
|
# define OLED_RENDER_LAYER_MODS " Mods"
|
|
|
|
|
|
|
|
# define OLED_RENDER_LOCK_NAME "Lock:"
|
|
|
|
# define OLED_RENDER_LOCK_NUML "NumL"
|
|
|
|
# define OLED_RENDER_LOCK_CAPS "CapL"
|
|
|
|
# define OLED_RENDER_LOCK_SCLK "ScrL"
|
|
|
|
|
|
|
|
# define OLED_RENDER_MODS_NAME "Mods: "
|
|
|
|
# define OLED_RENDER_MODS_SFT "Shft"
|
|
|
|
# define OLED_RENDER_MODS_CTL "Ctrl"
|
|
|
|
# define OLED_RENDER_MODS_ALT "Alt\n"
|
|
|
|
# define OLED_RENDER_MODS_GUI "GUI\n"
|
|
|
|
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK"
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
|
2021-05-25 22:24:01 +06:00
|
|
|
# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT"
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
|
|
|
|
# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
|
2020-04-01 05:26:43 +06:00
|
|
|
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_USER_NAME "USER:"
|
|
|
|
# define OLED_RENDER_USER_ANIM "Anim"
|
|
|
|
# define OLED_RENDER_USER_LAYR "Layr"
|
|
|
|
# define OLED_RENDER_USER_NUKE "Nuke"
|
2020-04-01 05:26:43 +06:00
|
|
|
|
2021-07-01 13:42:32 +06:00
|
|
|
# define OLED_RENDER_WPM_COUNTER "WPM: "
|
2020-04-01 05:26:43 +06:00
|
|
|
#endif
|
2022-01-22 09:36:52 +06:00
|
|
|
|
|
|
|
|
|
|
|
extern char keylog_str[OLED_KEYLOGGER_LENGTH];
|
2022-01-31 03:20:33 +06:00
|
|
|
|
|
|
|
#ifndef OLED_WPM_GRAPH_MAX_WPM
|
|
|
|
# define OLED_WPM_GRAPH_MAX_WPM 120
|
|
|
|
#endif
|
|
|
|
#ifndef OLED_WPM_GRAPH_REFRESH_INTERVAL
|
|
|
|
# define OLED_WPM_GRAPH_REFRESH_INTERVAL 300
|
|
|
|
#endif
|
|
|
|
#ifndef OLED_WPM_GRAPH_AREA_FILL_INTERVAL
|
|
|
|
# define OLED_WPM_GRAPH_AREA_FILL_INTERVAL 3
|
|
|
|
#endif
|
|
|
|
#ifndef OLED_WPM_GRAPH_VERTCAL_LINE_INTERVAL
|
|
|
|
# define OLED_WPM_GRAPH_VERTCAL_LINE_INTERVAL 3
|
|
|
|
#endif
|
|
|
|
#ifndef OLED_WPM_GRAPH_GRAPH_LINE_THICKNESS
|
|
|
|
# define OLED_WPM_GRAPH_GRAPH_LINE_THICKNESS 2
|
|
|
|
#endif
|