diff options
author | Joel Challis <git@zvecr.com> | 2023-12-18 01:51:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-18 12:51:24 +1100 |
commit | 27a710861ebd2a1e0a13a7e39f6a6c6568909bb4 (patch) | |
tree | f7790e8d26b6ffe3997441116cf903d2b23c2d0c /keyboards/crkbd/keymaps/jpe230/oled/avr | |
parent | 1556a2ed0e172cbaadcdc2acd7d5c8f57fb078f9 (diff) |
[Keymap Removal] Preonic and related keymaps. (#22689)
Diffstat (limited to 'keyboards/crkbd/keymaps/jpe230/oled/avr')
-rw-r--r-- | keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c | 75 | ||||
-rw-r--r-- | keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c | 14 |
2 files changed, 0 insertions, 89 deletions
diff --git a/keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c b/keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c deleted file mode 100644 index f0f6f3f62f..0000000000 --- a/keyboards/crkbd/keymaps/jpe230/oled/avr/master/oled_master_handler.c +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Jose Pablo Ramirez (@jpe230) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "jpe230.h" - -extern uint8_t logged_row; -extern uint8_t logged_col; -extern uint32_t oled_timer; -static char logged_char = ' '; -static uint16_t logged_keycode = 0; - -#define L_BASE 0 -#define L_LOWER 2 -#define L_RAISE 4 -#define L_ADJUST 8 - -void oled_render_layer_state(void) { - oled_write_P(PSTR("Layer: "), false); - switch (layer_state) { - case L_BASE: - oled_write_ln_P(PSTR("Default"), false); - break; - case L_LOWER: - oled_write_ln_P(PSTR("Lower"), false); - break; - case L_RAISE: - oled_write_ln_P(PSTR("Raise"), false); - break; - case L_ADJUST: - case L_ADJUST|L_LOWER: - case L_ADJUST|L_RAISE: - case L_ADJUST|L_LOWER|L_RAISE: - oled_write_ln_P(PSTR("Adjust"), false); - break; - } -} - -const char code_to_name[60] = { - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', - 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', - '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; - -void handle_oled_keypress(uint16_t keycode, keyrecord_t *record) { - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || - (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } - if (keycode < 60) { - logged_char = code_to_name[keycode]; - } - - logged_keycode = keycode; -} - -void oled_render_keylog(void) { - oled_write(get_u8_str(logged_row, '0'), false); - oled_write_P(PSTR(":"), false); - oled_write(get_u8_str(logged_col, '0'), false); - oled_write_P(PSTR(", "), false); - oled_write(get_u16_str(logged_keycode, ' '), false); - oled_write_P(PSTR(" : "), false); - oled_write((const char *)&logged_char, false); -} - -void render_master_oled(void) { - if (timer_elapsed32(oled_timer) > CUSTOM_OLED_TIMEOUT) { - oled_off(); - return; - } - - oled_on(); - oled_render_layer_state(); - oled_render_keylog(); -} diff --git a/keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c b/keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c deleted file mode 100644 index c47fb2a07b..0000000000 --- a/keyboards/crkbd/keymaps/jpe230/oled/avr/slave/oled_slave_handler.c +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2022 Jose Pablo Ramirez (@jpe230) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "jpe230.h" - -void render_slave_oled(void) { - static const char PROGMEM crkbd_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, - 0}; - oled_write_P(crkbd_logo, false); -} - |