summaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/hvp/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/crkbd/keymaps/hvp/keymap.c')
-rw-r--r--keyboards/crkbd/keymaps/hvp/keymap.c45
1 files changed, 12 insertions, 33 deletions
diff --git a/keyboards/crkbd/keymaps/hvp/keymap.c b/keyboards/crkbd/keymaps/hvp/keymap.c
index 9e72504653..c3d25cd99c 100644
--- a/keyboards/crkbd/keymaps/hvp/keymap.c
+++ b/keyboards/crkbd/keymaps/hvp/keymap.c
@@ -91,14 +91,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(); // turns on the display
- #endif
}
-//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
-#ifdef SSD1306OLED
+#ifdef OLED_ENABLE
// When add source files to SRC in rules.mk, you can use functions.
const char *read_layer_state(void);
@@ -112,42 +107,26 @@ const char *read_keylogs(void);
// void set_timelog(void);
// const char *read_timelog(void);
-void matrix_scan_user(void) {
- iota_gfx_task();
-}
-
-void matrix_render_user(struct CharacterMatrix *matrix) {
+bool oled_task_user(void) {
if (is_keyboard_master()) {
// If you want to change the display of OLED, you need to change here
- matrix_write(matrix, read_layer_state());
- matrix_write(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());
+ oled_write(read_layer_state(), false);
+ oled_write(read_keylog(), false);
+ //oled_write_ln(read_keylogs(), false);
+ //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false);
+ //oled_write_ln(read_host_led_state()), false;
+ //oled_write_ln(read_timelog(), false);
} 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;
+ oled_write(read_logo(), false);
}
+ return false;
}
-void iota_gfx_task_user(void) {
- struct CharacterMatrix matrix;
- matrix_clear(&matrix);
- matrix_render_user(&matrix);
- matrix_update(&display, &matrix);
-}
-#endif//SSD1306OLED
+#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
-#ifdef SSD1306OLED
+#ifdef OLED_ENABLE
set_keylog(keycode, record);
#endif
// set_timelog();