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/crkbd | |
parent | 6fd20acf4be76e7a2bd82d3dfd0a9bcca8c507eb (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 'keyboards/crkbd')
36 files changed, 136 insertions, 119 deletions
diff --git a/keyboards/crkbd/keymaps/armand1m/keymap.c b/keyboards/crkbd/keymaps/armand1m/keymap.c index 190cb4cf37..a37862fad3 100644 --- a/keyboards/crkbd/keymaps/armand1m/keymap.c +++ b/keyboards/crkbd/keymaps/armand1m/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { @@ -133,4 +133,4 @@ void oled_render_amsterdam_flag(void) { void oled_task_user(void) { oled_render_amsterdam_flag(); } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/armand1m/rules.mk b/keyboards/crkbd/keymaps/armand1m/rules.mk index 9444b88d51..d34d066ded 100644 --- a/keyboards/crkbd/keymaps/armand1m/rules.mk +++ b/keyboards/crkbd/keymaps/armand1m/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/curry/rules.mk b/keyboards/crkbd/keymaps/curry/rules.mk index eb56708fc5..fc0e7e1924 100644 --- a/keyboards/crkbd/keymaps/curry/rules.mk +++ b/keyboards/crkbd/keymaps/curry/rules.mk @@ -10,7 +10,7 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes BOOTLOADER = atmel-dfu SPLIT_TRANSPORT = mirror diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 0bc4591263..88d40ee407 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -172,4 +172,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/default/rules.mk b/keyboards/crkbd/keymaps/default/rules.mk index 9444b88d51..d34d066ded 100644 --- a/keyboards/crkbd/keymaps/default/rules.mk +++ b/keyboards/crkbd/keymaps/default/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/devdev/keymap.c b/keyboards/crkbd/keymaps/devdev/keymap.c index 4da3fcaa64..aa4d39a253 100644 --- a/keyboards/crkbd/keymaps/devdev/keymap.c +++ b/keyboards/crkbd/keymaps/devdev/keymap.c @@ -1,18 +1,18 @@ /* Copyright 2020 Dane Evans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ // CRKBD @@ -20,12 +20,12 @@ char layer_state_str[24]; - - + + enum userspace_layers { _DEFAULTS = 0, _COLEMAK = 0, - _COLEMAKDH, + _COLEMAKDH, _QWERTY, _NUM, _SYM, @@ -33,37 +33,37 @@ char layer_state_str[24]; _NUMPAD, _SWITCH, _MOVE, - + }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - // colemak + + // colemak [_COLEMAK] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(_NUMPAD,KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, LT(_SWITCH,KC_J), KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I,LT(_NUMPAD,KC_O),KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| KC_LGUI, MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), KC_LALT //`--------------------------' `--------------------------' ), - + // colemak DH [_COLEMAKDH] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(_NUMPAD,KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_B, LT(_SWITCH,KC_J), KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I,LT(_NUMPAD,KC_O),KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LCTL, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), KC_LALT + KC_LGUI, MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), KC_LALT //`--------------------------' `--------------------------' ), - + // qwerty [_QWERTY] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. @@ -77,9 +77,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - - - // numbers - L thumb + + + // numbers - L thumb [_NUM] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, @@ -91,8 +91,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_COMMAND), KC_TRNS //`--------------------------' `--------------------------' ), - - // symbols - R thumb + + // symbols - R thumb [_SYM] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, @@ -104,8 +104,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, MO(_COMMAND), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //`--------------------------' `--------------------------' ), - - // commands - both thumbs + + // commands - both thumbs [_COMMAND] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, @@ -114,24 +114,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, DF(2), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //`--------------------------' `--------------------------' ), - - // numpad + + // numpad [_NUMPAD] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(0,KC_NO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_CIRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_P4, KC_P5, KC_P6, KC_EQL, KC_DEL, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PLUS, KC_P1, KC_P2, KC_P3, KC_SLSH, KC_NO, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| OSM(MOD_MEH), KC_NO, KC_TRNS, KC_ENT, KC_P0, KC_PDOT //`--------------------------' `--------------------------' - ), - - // layer switcher + ), + + // layer switcher [_SWITCH] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. TO(0), TO(1), TO(2), TO(3), TO(4), TO(5), KC_NO, TO(7), KC_NO, KC_NO, KC_NO, RESET, @@ -139,62 +139,62 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, EEP_RST, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_SYSTEM_SLEEP, KC_NO, KC_BRID, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO //`--------------------------' `--------------------------' - - ), - - // amovement + + ), + + // amovement [_MOVE] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(0,KC_NO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_ENT, KC_RGHT, KC_NO, KC_NO, KC_NO, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_APP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_DOWN, KC_PGDN, KC_DEL, KC_NO, KC_NO, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO //`--------------------------' `--------------------------' ) }; -// it appears that these are different to the board numbering. -// when you specify n here, it lightss up n+1 on the board diagram - actually may be an entirely different pattern +// it appears that these are different to the board numbering. +// when you specify n here, it lightss up n+1 on the board diagram - actually may be an entirely different pattern // _QWERTY, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_qwerty_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_AZURE} ); // _COLEMAKDH, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_colemakdh_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_RED} ); // _NUM, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_num_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_TEAL} ); // _SYMBOL, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_symbol_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_BLUE} ); // _COMMAND, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_command_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_PURPLE} ); //_NUMPAD -//havent worked out how to do each side individually either +//havent worked out how to do each side individually either const rgblight_segment_t PROGMEM layer_numpad_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_ORANGE} ); @@ -206,13 +206,13 @@ const rgblight_segment_t PROGMEM layer_numpad_rh_lights[] = RGBLIGHT_LAYER_SEGME ); // _MOVE, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_move_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_PINK} ); // _SWITCHER // light up top row -const rgblight_segment_t PROGMEM layer_switcher_lights[] = RGBLIGHT_LAYER_SEGMENTS( +const rgblight_segment_t PROGMEM layer_switcher_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 6, HSV_GREEN}, {9, 2, HSV_GREEN}, {17, 2, HSV_GREEN}, @@ -222,12 +222,12 @@ const rgblight_segment_t PROGMEM layer_switcher_lights[] = RGBLIGHT_LAYER_SEGMEN // Now define the array of layers. Later layers take precedence const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - layer_qwerty_lights, + layer_qwerty_lights, layer_colemakdh_lights, layer_num_lights,// overrides layer 1 layer_symbol_lights, - layer_command_lights, - layer_numpad_lights, + layer_command_lights, + layer_numpad_lights, layer_numpad_rh_lights, layer_move_lights, layer_switcher_lights // Overrides other layers @@ -236,7 +236,7 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( void keyboard_post_init_user(void) { // Enable the LED layers rgblight_layers = my_rgb_layers; - rgblight_mode(10);// haven't found a way to set this in a more useful way + rgblight_mode(10);// haven't found a way to set this in a more useful way } @@ -244,7 +244,7 @@ void keyboard_post_init_user(void) { layer_state_t layer_state_set_user(layer_state_t state) { rgblight_set_layer_state(0, layer_state_cmp(state, _DEFAULTS) && layer_state_cmp(default_layer_state,_QWERTY)); rgblight_set_layer_state(1, layer_state_cmp(state, _DEFAULTS) && layer_state_cmp(default_layer_state,_QWERTY)); - + rgblight_set_layer_state(2, layer_state_cmp(state, _NUM)); rgblight_set_layer_state(3, layer_state_cmp(state, _SYM)); rgblight_set_layer_state(4, layer_state_cmp(state, _COMMAND)); @@ -266,7 +266,7 @@ bool led_update_user(led_t led_state) { //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -288,7 +288,7 @@ const char *read_mode_icon(bool swap); void oled_render_layer_state(void) { - char string [24]; + char string [24]; switch (get_highest_layer(default_layer_state|layer_state)) { case _QWERTY: @@ -296,10 +296,10 @@ void oled_render_layer_state(void) { break; case _COLEMAK: oled_write_ln_P(PSTR("Layer: COLEMAK"),false); - break; + break; case _COLEMAKDH: oled_write_ln_P(PSTR("Layer: COLEMAKDH"),false); - break; + break; case _NUM: oled_write_ln_P(PSTR("Layer: Numbers"),false); break; @@ -311,13 +311,13 @@ void oled_render_layer_state(void) { break; case _NUMPAD: oled_write_ln_P(PSTR("Layer: Numpad"),false); - break; + break; case _MOVE: oled_write_ln_P(PSTR("Layer: Movement"),false); break; case _SWITCH: oled_write_ln_P(PSTR("Layer: Layer Switch"),false); - break; + break; default: snprintf(string, sizeof(string), "%ld",layer_state); oled_write_P(PSTR("Layer: Undef-"),false); @@ -407,4 +407,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE
\ No newline at end of file +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/devdev/rules.mk b/keyboards/crkbd/keymaps/devdev/rules.mk index 58e90c8116..4aaf22fd04 100644 --- a/keyboards/crkbd/keymaps/devdev/rules.mk +++ b/keyboards/crkbd/keymaps/devdev/rules.mk @@ -1,4 +1,5 @@ MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes RGBLIGHT_ENABLE = yes -OLED_DRIVER_ENABLE = yes
\ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c index 6cf593bc3d..11690b0294 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -75,7 +75,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_left()) return OLED_ROTATION_180; // flips the display 180 to see it from my side diff --git a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk index 0de8069718..161517dd85 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk +++ b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk @@ -3,7 +3,7 @@ SRC += ./logo_reader.c # enable OLED displays -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no # enable media keys EXTRAKEY_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index 2e0fed47ee..3a3748c691 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -2,7 +2,7 @@ #include <string.h> #include "oled.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_host_led_state(void) { oled_write(read_host_led_state(), false); } void render_layer_state(void) { @@ -52,4 +52,4 @@ void oled_task_user(void) { render_logo(); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/edvorakjp/rules.mk b/keyboards/crkbd/keymaps/edvorakjp/rules.mk index 1ec910800f..1291d50e92 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/rules.mk +++ b/keyboards/crkbd/keymaps/edvorakjp/rules.mk @@ -16,7 +16,8 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing TAP_DANCE_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/crkbd/keymaps/gotham/keymap.c b/keyboards/crkbd/keymaps/gotham/keymap.c index 8b864277c8..7cf4b7fd50 100644 --- a/keyboards/crkbd/keymaps/gotham/keymap.c +++ b/keyboards/crkbd/keymaps/gotham/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #include "keycodes.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled.c" #endif @@ -78,7 +78,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE if (record->event.pressed) { oled_timer = timer_read(); add_keylog(keycode); diff --git a/keyboards/crkbd/keymaps/gotham/rules.mk b/keyboards/crkbd/keymaps/gotham/rules.mk index eaf8f89fd1..48a2c1d72a 100644 --- a/keyboards/crkbd/keymaps/gotham/rules.mk +++ b/keyboards/crkbd/keymaps/gotham/rules.mk @@ -2,5 +2,6 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes AUDIO_ENABLE = yes RGBLIGHT_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 952fb669bb..7cb08f40d5 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -73,7 +73,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { default: // Use process_record_keymap to reset timer on all other keypresses to awaken from idle. if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_timer = timer_read32(); #endif // Restore LEDs if they are enabled by user @@ -125,7 +125,7 @@ void matrix_scan_user(void) { } } // [OLED Configuration] ------------------------------------------------------// -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // Init Oled and Rotate.... oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) diff --git a/keyboards/crkbd/keymaps/kidbrazil/rules.mk b/keyboards/crkbd/keymaps/kidbrazil/rules.mk index c58f43c2b4..5566a6130b 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/rules.mk +++ b/keyboards/crkbd/keymaps/kidbrazil/rules.mk @@ -5,7 +5,8 @@ AUDIO_ENABLE = no # Audio output on port C6 MOUSEKEY_ENABLE = no RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # If you want to change the display of OLED, you need to change here SRC += logo_reader.c \ diff --git a/keyboards/crkbd/keymaps/mcrown/rules.mk b/keyboards/crkbd/keymaps/mcrown/rules.mk index df09acc6c0..922e246ba9 100644 --- a/keyboards/crkbd/keymaps/mcrown/rules.mk +++ b/keyboards/crkbd/keymaps/mcrown/rules.mk @@ -5,8 +5,9 @@ # MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) -RGB_MATRIX_ENABLE = yes # Enable RGB Matrix. -OLED_DRIVER_ENABLE = yes +RGB_MATRIX_ENABLE = yes # Enable RGB Matrix. +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend diff --git a/keyboards/crkbd/keymaps/ninjonas/rules.mk b/keyboards/crkbd/keymaps/ninjonas/rules.mk index 3c3bf923e6..c40a827798 100644 --- a/keyboards/crkbd/keymaps/ninjonas/rules.mk +++ b/keyboards/crkbd/keymaps/ninjonas/rules.mk @@ -1,6 +1,7 @@ RGB_MATRIX_ENABLE = yes MOUSEKEY_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/crkbd/keymaps/oled_sample/keymap.c b/keyboards/crkbd/keymaps/oled_sample/keymap.c index b8c3985fb9..14b4535855 100644 --- a/keyboards/crkbd/keymaps/oled_sample/keymap.c +++ b/keyboards/crkbd/keymaps/oled_sample/keymap.c @@ -74,7 +74,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_270; diff --git a/keyboards/crkbd/keymaps/oled_sample/rules.mk b/keyboards/crkbd/keymaps/oled_sample/rules.mk index fb480bba88..d9db223cfa 100644 --- a/keyboards/crkbd/keymaps/oled_sample/rules.mk +++ b/keyboards/crkbd/keymaps/oled_sample/rules.mk @@ -4,4 +4,5 @@ # the appropriate keymap folder that will get included automatically # RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/oo/keymap.c b/keyboards/crkbd/keymaps/oo/keymap.c index 17d5788d6d..c0416d9726 100644 --- a/keyboards/crkbd/keymaps/oo/keymap.c +++ b/keyboards/crkbd/keymaps/oo/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include <stdio.h> oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { @@ -163,4 +163,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/oo/rules.mk b/keyboards/crkbd/keymaps/oo/rules.mk index c582662134..d34d066ded 100644 --- a/keyboards/crkbd/keymaps/oo/rules.mk +++ b/keyboards/crkbd/keymaps/oo/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c index e1e0518745..7ca234a0ee 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c +++ b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include <stdio.h> oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -219,4 +219,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/rjhilgefort/rules.mk b/keyboards/crkbd/keymaps/rjhilgefort/rules.mk index a1b6e79e7e..c6c258e255 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/rules.mk +++ b/keyboards/crkbd/keymaps/rjhilgefort/rules.mk @@ -4,4 +4,5 @@ BOOTLOADER = atmel-dfu # https://www.reddit.com/r/olkb/comments/9pyc0u/qmk_media_keys_are_not_working/ EXTRAKEY_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 9e5f75c362..3c5222eda8 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Select hand configuration */ #define EE_HANDS -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # undef SSD1306OLED # define OLED_TIMEOUT 600000 #endif diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c index 2dafbd2a70..d632e255d5 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/keymap.c +++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c @@ -180,7 +180,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_270; diff --git a/keyboards/crkbd/keymaps/rpbaptist/rules.mk b/keyboards/crkbd/keymaps/rpbaptist/rules.mk index bac8680c5d..2366f669a0 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/rules.mk +++ b/keyboards/crkbd/keymaps/rpbaptist/rules.mk @@ -28,7 +28,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend BOOTLOADER = qmk-dfu -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ifeq ($(strip $(THEME)), godspeed) OPT_DEFS += -DTHEME_GODSPEED diff --git a/keyboards/crkbd/keymaps/snowe/rules.mk b/keyboards/crkbd/keymaps/snowe/rules.mk index c14736e9dd..ce3b5928fa 100644 --- a/keyboards/crkbd/keymaps/snowe/rules.mk +++ b/keyboards/crkbd/keymaps/snowe/rules.mk @@ -13,7 +13,8 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID SWAP_HANDS_ENABLE = no # Enable one-hand typing RGBLIGHT_TWINKLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 RGB_MATRIX_ENABLE = yes OCEAN_DREAM_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c index 144586969d..67cfa78f92 100644 --- a/keyboards/crkbd/keymaps/soundmonster/keymap.c +++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c @@ -7,7 +7,7 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static uint32_t oled_timer = 0; #endif @@ -102,7 +102,7 @@ void matrix_init_user(void) { #endif } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } void render_space(void) { @@ -319,7 +319,7 @@ void oled_task_user(void) { #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_timer = timer_read32(); #endif // set_timelog(); diff --git a/keyboards/crkbd/keymaps/soundmonster/rules.mk b/keyboards/crkbd/keymaps/soundmonster/rules.mk index a73e6fe027..62971258e9 100644 --- a/keyboards/crkbd/keymaps/soundmonster/rules.mk +++ b/keyboards/crkbd/keymaps/soundmonster/rules.mk @@ -2,5 +2,6 @@ RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes MOUSEKEY_ENABLE = no NKRO_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/sulrich/keymap.c b/keyboards/crkbd/keymaps/sulrich/keymap.c index 4e75d5bddd..f1cd60c526 100644 --- a/keyboards/crkbd/keymaps/sulrich/keymap.c +++ b/keyboards/crkbd/keymaps/sulrich/keymap.c @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -152,5 +152,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/sulrich/rules.mk b/keyboards/crkbd/keymaps/sulrich/rules.mk index 5ec4f05875..24d83947a9 100644 --- a/keyboards/crkbd/keymaps/sulrich/rules.mk +++ b/keyboards/crkbd/keymaps/sulrich/rules.mk @@ -1,2 +1,3 @@ EXTRAKEY_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/vayashiko/keymap.c b/keyboards/crkbd/keymaps/vayashiko/keymap.c index e9befa5551..a1a8f7e9f5 100644 --- a/keyboards/crkbd/keymaps/vayashiko/keymap.c +++ b/keyboards/crkbd/keymaps/vayashiko/keymap.c @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_master) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -179,4 +179,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/via/keymap.c b/keyboards/crkbd/keymaps/via/keymap.c index 4735255eae..cbaeb93f6d 100644 --- a/keyboards/crkbd/keymaps/via/keymap.c +++ b/keyboards/crkbd/keymaps/via/keymap.c @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include <stdio.h> oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -173,4 +173,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/via/rules.mk b/keyboards/crkbd/keymaps/via/rules.mk index 93b2afed44..69841c2358 100644 --- a/keyboards/crkbd/keymaps/via/rules.mk +++ b/keyboards/crkbd/keymaps/via/rules.mk @@ -1,5 +1,6 @@ MOUSEKEY_ENABLE = no # Mouse keys RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. VIA_ENABLE = yes # Enable VIA -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/xyverz/keymap.c b/keyboards/crkbd/keymaps/xyverz/keymap.c index ff9d258f01..d99d9d6baf 100644 --- a/keyboards/crkbd/keymaps/xyverz/keymap.c +++ b/keyboards/crkbd/keymaps/xyverz/keymap.c @@ -100,7 +100,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -202,4 +202,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/xyverz/rules.mk b/keyboards/crkbd/keymaps/xyverz/rules.mk index 1d320c0f35..d34d066ded 100644 --- a/keyboards/crkbd/keymaps/xyverz/rules.mk +++ b/keyboards/crkbd/keymaps/xyverz/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes
\ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 |