From 6018b56c5595b97e45837d1ee9c96d9c3d795c43 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 1 Aug 2023 00:43:10 +1000 Subject: Remove old OLED API code (#21651) --- keyboards/lily58/keymaps/hvp/config.h | 2 -- keyboards/lily58/keymaps/hvp/keymap.c | 57 ----------------------------------- 2 files changed, 59 deletions(-) (limited to 'keyboards/lily58/keymaps/hvp') diff --git a/keyboards/lily58/keymaps/hvp/config.h b/keyboards/lily58/keymaps/hvp/config.h index ec0960470a..35c0f25f2c 100644 --- a/keyboards/lily58/keymaps/hvp/config.h +++ b/keyboards/lily58/keymaps/hvp/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define TAPPING_TERM 100 #undef TAPPING_TERM #define TAPPING_TERM 150 diff --git a/keyboards/lily58/keymaps/hvp/keymap.c b/keyboards/lily58/keymaps/hvp/keymap.c index 5ca0b73653..b94ea9397c 100644 --- a/keyboards/lily58/keymaps/hvp/keymap.c +++ b/keyboards/lily58/keymaps/hvp/keymap.c @@ -5,9 +5,6 @@ #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -84,63 +81,9 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -// When add source files to SRC in rules.mk, you can use functions. -const char *read_layer_state(void); -const char *read_logo(void); -void set_keylog(uint16_t keycode, keyrecord_t *record); -const char *read_keylog(void); -const char *read_keylogs(void); - -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { - // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); - } else { - matrix_write(matrix, read_logo()); - } } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { -#ifdef SSD1306OLED - set_keylog(keycode, record); -#endif - // set_timelog(); - } - switch (keycode) { case QWERTY: if (record->event.pressed) { -- cgit v1.2.3