diff options
author | Xelus22 <17491233+Xelus22@users.noreply.github.com> | 2021-08-24 16:28:26 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 16:28:26 +1000 |
commit | 4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0 (patch) | |
tree | 24ff5bdf570a6a9f5a77a517005bffbb35e46b22 /keyboards/getta25 | |
parent | 6fd20acf4be76e7a2bd82d3dfd0a9bcca8c507eb (diff) | |
download | qmk_firmware-4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0.tar.gz qmk_firmware-4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0.zip |
[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 'keyboards/getta25')
-rw-r--r-- | keyboards/getta25/keymaps/oled/keymap.c | 14 | ||||
-rw-r--r-- | keyboards/getta25/keymaps/oled/rules.mk | 3 | ||||
-rw-r--r-- | keyboards/getta25/rules.mk | 4 |
3 files changed, 11 insertions, 10 deletions
diff --git a/keyboards/getta25/keymaps/oled/keymap.c b/keyboards/getta25/keymaps/oled/keymap.c index 44833857d..4fbaf3ec2 100644 --- a/keyboards/getta25/keymaps/oled/keymap.c +++ b/keyboards/getta25/keymaps/oled/keymap.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
2 | #include "keymap_jp.h" | 2 | #include "keymap_jp.h" |
3 | 3 | ||
4 | #ifdef OLED_DRIVER_ENABLE | 4 | #ifdef OLED_ENABLE |
5 | static uint32_t oled_timer = 0; | 5 | static uint32_t oled_timer = 0; |
6 | #endif | 6 | #endif |
7 | 7 | ||
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
38 | //|--------+--------+--------+--------+--------| | 38 | //|--------+--------+--------+--------+--------| |
39 | KC_P1, KC_P2, KC_P3, KC_DEL, | 39 | KC_P1, KC_P2, KC_P3, KC_DEL, |
40 | //|--------+--------+--------+--------+--------| | 40 | //|--------+--------+--------+--------+--------| |
41 | LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC | 41 | LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC |
42 | //`--------------------------------------------' | 42 | //`--------------------------------------------' |
43 | ), | 43 | ), |
44 | 44 | ||
@@ -54,7 +54,7 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC | |||
54 | //|--------+--------+--------+--------+--------| | 54 | //|--------+--------+--------+--------+--------| |
55 | XXXXXXX, KC_DOWN, XXXXXXX, _______, | 55 | XXXXXXX, KC_DOWN, XXXXXXX, _______, |
56 | //|--------+--------+--------+--------+--------| | 56 | //|--------+--------+--------+--------+--------| |
57 | MO(_ARROW), MO(_MACRO), _______, _______ | 57 | MO(_ARROW), MO(_MACRO), _______, _______ |
58 | //`--------------------------------------------' | 58 | //`--------------------------------------------' |
59 | ), | 59 | ), |
60 | 60 | ||
@@ -70,7 +70,7 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC | |||
70 | //|--------+--------+--------+--------+--------| | 70 | //|--------+--------+--------+--------+--------| |
71 | KC_F11, KC_F12, KC_F3, _______, | 71 | KC_F11, KC_F12, KC_F3, _______, |
72 | //|--------+--------+--------+--------+--------| | 72 | //|--------+--------+--------+--------+--------| |
73 | _______, _______, JP_RPRN, _______ | 73 | _______, _______, JP_RPRN, _______ |
74 | //`--------------------------------------------' | 74 | //`--------------------------------------------' |
75 | ), | 75 | ), |
76 | 76 | ||
@@ -86,7 +86,7 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC | |||
86 | //|--------+--------+--------+--------+--------| | 86 | //|--------+--------+--------+--------+--------| |
87 | RGB_VAD, RGB_VAI, XXXXXXX, _______, | 87 | RGB_VAD, RGB_VAI, XXXXXXX, _______, |
88 | //|--------+--------+--------+--------+--------| | 88 | //|--------+--------+--------+--------+--------| |
89 | _______, _______, RGB_MOD, _______ | 89 | _______, _______, RGB_MOD, _______ |
90 | //`--------------------------------------------' | 90 | //`--------------------------------------------' |
91 | ) | 91 | ) |
92 | }; | 92 | }; |
@@ -118,7 +118,7 @@ int RGB_current_mode; | |||
118 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 118 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
119 | bool result = false; | 119 | bool result = false; |
120 | if (record->event.pressed) { | 120 | if (record->event.pressed) { |
121 | #ifdef OLED_DRIVER_ENABLE | 121 | #ifdef OLED_ENABLE |
122 | oled_timer = timer_read32(); | 122 | oled_timer = timer_read32(); |
123 | #endif | 123 | #endif |
124 | } | 124 | } |
@@ -156,7 +156,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
156 | return result; | 156 | return result; |
157 | } | 157 | } |
158 | 158 | ||
159 | #ifdef OLED_DRIVER_ENABLE | 159 | #ifdef OLED_ENABLE |
160 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } | 160 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } |
161 | 161 | ||
162 | void render_layer_state(void) { | 162 | void render_layer_state(void) { |
diff --git a/keyboards/getta25/keymaps/oled/rules.mk b/keyboards/getta25/keymaps/oled/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/getta25/keymaps/oled/rules.mk +++ b/keyboards/getta25/keymaps/oled/rules.mk | |||
@@ -1 +1,2 @@ | |||
1 | OLED_DRIVER_ENABLE = yes | 1 | OLED_ENABLE = yes |
2 | OLED_DRIVER = SSD1306 | ||
diff --git a/keyboards/getta25/rules.mk b/keyboards/getta25/rules.mk index c870594a4..05e454630 100644 --- a/keyboards/getta25/rules.mk +++ b/keyboards/getta25/rules.mk | |||
@@ -24,8 +24,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||
24 | AUDIO_ENABLE = no # Audio output on port C6 | 24 | AUDIO_ENABLE = no # Audio output on port C6 |
25 | UNICODE_ENABLE = no # Unicode | 25 | UNICODE_ENABLE = no # Unicode |
26 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 26 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
27 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | 27 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. |
28 | OLED_DRIVER_ENABLE = no | 28 | OLED_ENABLE = no |
29 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 29 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
30 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 30 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
31 | 31 | ||