diff options
Diffstat (limited to 'drivers/oled/ssd1306_sh1106.c')
| -rw-r--r-- | drivers/oled/ssd1306_sh1106.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/oled/ssd1306_sh1106.c b/drivers/oled/ssd1306_sh1106.c index e9049438f..d9bd3c14b 100644 --- a/drivers/oled/ssd1306_sh1106.c +++ b/drivers/oled/ssd1306_sh1106.c | |||
| @@ -167,7 +167,7 @@ bool oled_init(oled_rotation_t rotation) { | |||
| 167 | } | 167 | } |
| 168 | #endif | 168 | #endif |
| 169 | 169 | ||
| 170 | oled_rotation = oled_init_user(rotation); | 170 | oled_rotation = oled_init_user(oled_init_kb(rotation)); |
| 171 | if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { | 171 | if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { |
| 172 | oled_rotation_width = OLED_DISPLAY_WIDTH; | 172 | oled_rotation_width = OLED_DISPLAY_WIDTH; |
| 173 | } else { | 173 | } else { |
| @@ -232,6 +232,7 @@ bool oled_init(oled_rotation_t rotation) { | |||
| 232 | return true; | 232 | return true; |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | __attribute__((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return rotation; } | ||
| 235 | __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } | 236 | __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } |
| 236 | 237 | ||
| 237 | void oled_clear(void) { | 238 | void oled_clear(void) { |
| @@ -741,11 +742,11 @@ void oled_task(void) { | |||
| 741 | if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) { | 742 | if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) { |
| 742 | oled_update_timeout = timer_read(); | 743 | oled_update_timeout = timer_read(); |
| 743 | oled_set_cursor(0, 0); | 744 | oled_set_cursor(0, 0); |
| 744 | oled_task_user(); | 745 | oled_task_kb(); |
| 745 | } | 746 | } |
| 746 | #else | 747 | #else |
| 747 | oled_set_cursor(0, 0); | 748 | oled_set_cursor(0, 0); |
| 748 | oled_task_user(); | 749 | oled_task_kb(); |
| 749 | #endif | 750 | #endif |
| 750 | 751 | ||
| 751 | #if OLED_SCROLL_TIMEOUT > 0 | 752 | #if OLED_SCROLL_TIMEOUT > 0 |
| @@ -776,4 +777,5 @@ void oled_task(void) { | |||
| 776 | #endif | 777 | #endif |
| 777 | } | 778 | } |
| 778 | 779 | ||
| 779 | __attribute__((weak)) void oled_task_user(void) {} | 780 | __attribute__((weak)) bool oled_task_kb(void) { return oled_task_user(); } |
| 781 | __attribute__((weak)) bool oled_task_user(void) { return true; } | ||
