summaryrefslogtreecommitdiff
path: root/users/ninjonas
diff options
context:
space:
mode:
authorXelus22 <17491233+Xelus22@users.noreply.github.com>2021-08-24 16:28:26 +1000
committerGitHub <noreply@github.com>2021-08-24 16:28:26 +1000
commit4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0 (patch)
tree24ff5bdf570a6a9f5a77a517005bffbb35e46b22 /users/ninjonas
parent6fd20acf4be76e7a2bd82d3dfd0a9bcca8c507eb (diff)
[Core] Refactor OLED to allow easy addition of other types (#13454)
* add docs * core changes * update keyboards to new OLED * updated users to new OLED * update layouts to new OLED * fixup docs * drashna's suggestion * fix up docs * new keyboards with oled * core split changes * remaining keyboard files * Fix The Helix keyboards oled options * reflect develop Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: mtei <2170248+mtei@users.noreply.github.com>
Diffstat (limited to 'users/ninjonas')
-rw-r--r--users/ninjonas/oled.c20
-rw-r--r--users/ninjonas/process_records.c4
-rw-r--r--users/ninjonas/process_records.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c
index a3514f54f6..1d88c30579 100644
--- a/users/ninjonas/oled.c
+++ b/users/ninjonas/oled.c
@@ -2,7 +2,7 @@
#include <stdio.h>
#include "ninjonas.h"
-#if defined(OLED_DRIVER_ENABLE) & !defined(KEYBOARD_kyria_rev1)
+#if defined(OLED_ENABLE) & !defined(KEYBOARD_kyria_rev1)
static uint32_t oled_timer = 0;
@@ -49,16 +49,16 @@ void render_layer_state(void) {
bool adjust = layer_state_is(_ADJUST);
bool numpad = layer_state_is(_NUMPAD);
- if(lower){
- oled_write_P(PSTR(" Lower "), true);
- } else if(raise){
- oled_write_P(PSTR(" Raise "), true);
- } else if(adjust){
- oled_write_P(PSTR(" Adjust "), true);
+ if(lower){
+ oled_write_P(PSTR(" Lower "), true);
+ } else if(raise){
+ oled_write_P(PSTR(" Raise "), true);
+ } else if(adjust){
+ oled_write_P(PSTR(" Adjust "), true);
} else if(numpad) {
- oled_write_P(PSTR(" Numpad "), true);
- } else {
- oled_write_P(PSTR(" Default"), false);
+ oled_write_P(PSTR(" Numpad "), true);
+ } else {
+ oled_write_P(PSTR(" Default"), false);
}
}
diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c
index a3b8417913..c298227e51 100644
--- a/users/ninjonas/process_records.c
+++ b/users/ninjonas/process_records.c
@@ -6,7 +6,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true;
__attribute__((weak))
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; }
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
__attribute__((weak))
bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; }
#endif
@@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
- #ifdef OLED_DRIVER_ENABLE
+ #ifdef OLED_ENABLE
&& process_record_oled(keycode, record)
#endif
; // Close return
diff --git a/users/ninjonas/process_records.h b/users/ninjonas/process_records.h
index 2e69ca2163..5b901a1659 100644
--- a/users/ninjonas/process_records.h
+++ b/users/ninjonas/process_records.h
@@ -25,6 +25,6 @@ enum custom_keycodes {
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
bool process_record_oled(uint16_t keycode, keyrecord_t *record);
#endif