[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>
qmk_compile_improvements
Xelus22 4 years ago committed by GitHub
parent 6fd20acf4b
commit 4e1c5887c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      common_features.mk
  2. 16
      docs/feature_oled_driver.md
  3. 0
      drivers/oled/ssd1306_sh1106.c
  4. 2
      keyboards/0xcb/1337/keymaps/conor/keymap.c
  5. 2
      keyboards/0xcb/1337/keymaps/default/keymap.c
  6. 2
      keyboards/0xcb/1337/keymaps/jakob/keymap.c
  7. 2
      keyboards/0xcb/1337/keymaps/via/keymap.c
  8. 3
      keyboards/0xcb/1337/rules.mk
  9. 2
      keyboards/0xcb/static/keymaps/default/keymap.c
  10. 2
      keyboards/0xcb/static/keymaps/via/keymap.c
  11. 3
      keyboards/0xcb/static/rules.mk
  12. 2
      keyboards/10bleoledhub/keymaps/default/keymap.c
  13. 2
      keyboards/10bleoledhub/keymaps/via/keymap.c
  14. 3
      keyboards/10bleoledhub/rules.mk
  15. 2
      keyboards/8pack/rules.mk
  16. 2
      keyboards/aeboards/ext65/keymaps/default/keymap.c
  17. 2
      keyboards/aeboards/ext65/keymaps/via/keymap.c
  18. 2
      keyboards/aeboards/ext65/keymaps/via/rules.mk
  19. 2
      keyboards/aeboards/ext65/rev2/rev2.c
  20. 2
      keyboards/aleblazer/zodiark/keymaps/default/config.h
  21. 2
      keyboards/aleblazer/zodiark/keymaps/default/keymap.c
  22. 2
      keyboards/aleblazer/zodiark/keymaps/slimoled/config.h
  23. 2
      keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c
  24. 2
      keyboards/aleblazer/zodiark/keymaps/via/config.h
  25. 2
      keyboards/aleblazer/zodiark/keymaps/via/oled.c
  26. 3
      keyboards/aleblazer/zodiark/rules.mk
  27. 2
      keyboards/anavi/macropad8/config.h
  28. 2
      keyboards/anavi/macropad8/keymaps/default/keymap.c
  29. 2
      keyboards/anavi/macropad8/keymaps/git/keymap.c
  30. 2
      keyboards/anavi/macropad8/keymaps/kicad/keymap.c
  31. 2
      keyboards/anavi/macropad8/keymaps/kodi/keymap.c
  32. 2
      keyboards/anavi/macropad8/keymaps/obs/keymap.c
  33. 2
      keyboards/anavi/macropad8/keymaps/zoom/keymap.c
  34. 3
      keyboards/anavi/macropad8/rules.mk
  35. 2
      keyboards/angel64/alpha/keymaps/default/keymap.c
  36. 2
      keyboards/angel64/rev1/keymaps/default/keymap.c
  37. 2
      keyboards/angel64/rev1/keymaps/kakunpc/keymap.c
  38. 3
      keyboards/angel64/rules.mk
  39. 2
      keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c
  40. 3
      keyboards/aplyard/aplx6/rev2/rules.mk
  41. 2
      keyboards/arabica37/keymaps/default/keymap.c
  42. 3
      keyboards/arabica37/keymaps/default/rules.mk
  43. 2
      keyboards/arch_36/keymaps/default/keymap.c
  44. 2
      keyboards/arch_36/keymaps/obosob/config.h
  45. 2
      keyboards/arch_36/keymaps/obosob/keymap.c
  46. 3
      keyboards/arch_36/rules.mk
  47. 2
      keyboards/basekeys/slice/keymaps/default/keymap.c
  48. 2
      keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c
  49. 2
      keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c
  50. 2
      keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c
  51. 3
      keyboards/basekeys/slice/rev1_rgb/rules.mk
  52. 2
      keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c
  53. 3
      keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk
  54. 2
      keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c
  55. 3
      keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk
  56. 2
      keyboards/boardsource/microdox/keymaps/cole/keymap.c
  57. 3
      keyboards/boardsource/microdox/keymaps/cole/rules.mk
  58. 2
      keyboards/boardsource/microdox/keymaps/via/keymap.c
  59. 3
      keyboards/boardsource/microdox/keymaps/via/rules.mk
  60. 2
      keyboards/business_card/alpha/keymaps/default/keymap.c
  61. 3
      keyboards/business_card/alpha/rules.mk
  62. 2
      keyboards/business_card/beta/keymaps/default/keymap.c
  63. 3
      keyboards/business_card/beta/rules.mk
  64. 2
      keyboards/cassette42/common/oled_helper.c
  65. 2
      keyboards/cassette42/common/oled_helper.h
  66. 2
      keyboards/cassette42/keymaps/default/keymap.c
  67. 3
      keyboards/cassette42/rules.mk
  68. 2
      keyboards/chidori/keymaps/oled_sample/keymap.c
  69. 3
      keyboards/chidori/keymaps/oled_sample/rules.mk
  70. 2
      keyboards/ckeys/washington/keymaps/default/keymap.c
  71. 3
      keyboards/ckeys/washington/rules.mk
  72. 2
      keyboards/claw44/keymaps/oled/keymap.c
  73. 3
      keyboards/claw44/keymaps/oled/rules.mk
  74. 2
      keyboards/claw44/rev1/rules.mk
  75. 4
      keyboards/crkbd/keymaps/armand1m/keymap.c
  76. 3
      keyboards/crkbd/keymaps/armand1m/rules.mk
  77. 2
      keyboards/crkbd/keymaps/curry/rules.mk
  78. 4
      keyboards/crkbd/keymaps/default/keymap.c
  79. 3
      keyboards/crkbd/keymaps/default/rules.mk
  80. 4
      keyboards/crkbd/keymaps/devdev/keymap.c
  81. 3
      keyboards/crkbd/keymaps/devdev/rules.mk
  82. 2
      keyboards/crkbd/keymaps/dsanchezseco/keymap.c
  83. 2
      keyboards/crkbd/keymaps/dsanchezseco/rules.mk
  84. 4
      keyboards/crkbd/keymaps/edvorakjp/oled.c
  85. 3
      keyboards/crkbd/keymaps/edvorakjp/rules.mk
  86. 4
      keyboards/crkbd/keymaps/gotham/keymap.c
  87. 3
      keyboards/crkbd/keymaps/gotham/rules.mk
  88. 4
      keyboards/crkbd/keymaps/kidbrazil/keymap.c
  89. 3
      keyboards/crkbd/keymaps/kidbrazil/rules.mk
  90. 3
      keyboards/crkbd/keymaps/mcrown/rules.mk
  91. 3
      keyboards/crkbd/keymaps/ninjonas/rules.mk
  92. 2
      keyboards/crkbd/keymaps/oled_sample/keymap.c
  93. 3
      keyboards/crkbd/keymaps/oled_sample/rules.mk
  94. 4
      keyboards/crkbd/keymaps/oo/keymap.c
  95. 3
      keyboards/crkbd/keymaps/oo/rules.mk
  96. 4
      keyboards/crkbd/keymaps/rjhilgefort/keymap.c
  97. 3
      keyboards/crkbd/keymaps/rjhilgefort/rules.mk
  98. 2
      keyboards/crkbd/keymaps/rpbaptist/config.h
  99. 2
      keyboards/crkbd/keymaps/rpbaptist/keymap.c
  100. 3
      keyboards/crkbd/keymaps/rpbaptist/rules.mk
  101. Some files were not shown because too many files have changed in this diff Show More

@ -592,11 +592,21 @@ ifeq ($(strip $(HD44780_ENABLE)), yes)
OPT_DEFS += -DHD44780_ENABLE
endif
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
OPT_DEFS += -DOLED_DRIVER_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled
QUANTUM_LIB_SRC += i2c_master.c
SRC += oled_driver.c
VALID_OLED_DRIVER_TYPES := SSD1306 custom
OLED_DRIVER ?= SSD1306
ifeq ($(strip $(OLED_ENABLE)), yes)
ifeq ($(filter $(OLED_DRIVER),$(VALID_OLED_DRIVER_TYPES)),)
$(error OLED_DRIVER="$(OLED_DRIVER)" is not a valid OLED driver)
else
OPT_DEFS += -DOLED_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled
OPT_DEFS += -DOLED_DRIVER_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
ifeq ($(strip $(OLED_DRIVER)), SSD1306)
SRC += ssd1306_sh1106.c
QUANTUM_LIB_SRC += i2c_master.c
endif
endif
endif
ifeq ($(strip $(ST7565_ENABLE)), yes)

@ -21,13 +21,23 @@ Hardware configurations using Arm-based microcontrollers or different sizes of O
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
```make
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
```
## OLED type
|OLED Driver |Supported Device |
|-------------------|---------------------------|
|SSD1306 (default) |For both SSD1306 and SH1106|
e.g.
```make
OLED_DRIVER = SSD1306
```
Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
```c
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
@ -114,7 +124,7 @@ static void fade_display(void) {
In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
```c
#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

@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif
/* oled stuff :) */
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
uint16_t startup_timer;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {

@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif
/* oled stuff :) */
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
uint16_t startup_timer;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {

@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif
/* oled stuff :) */
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
uint16_t startup_timer;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {

@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif
/* oled stuff :) */
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
uint16_t startup_timer;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {

@ -24,4 +24,5 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
LTO_ENABLE = yes
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -92,7 +92,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif
/* oled stuff :) */
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
uint16_t startup_timer = 0;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {

@ -92,7 +92,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif
/* oled stuff :) */
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
uint16_t startup_timer = 0;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {

@ -23,4 +23,5 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
LTO_ENABLE = yes
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -54,7 +54,7 @@ static void render_logo(void) {
oled_write_P(qmk_logo, false);
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) { render_logo(); }
#endif

@ -54,7 +54,7 @@ static void render_logo(void) {
oled_write_P(qmk_logo, false);
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) { render_logo(); }
#endif

@ -24,5 +24,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
BLUETOOTH = AdafruitBLE
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
ENCODER_ENABLE = yes

@ -24,6 +24,6 @@ NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: htt
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
OLED_DRIVER_ENABLE = no
OLED_ENABLE = no
DEFAULT_FOLDER = 8pack/rev12

@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void render_layer_state(void) {
oled_write_ln(PSTR("LAYER"), false);

@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void render_layer_state(void) {
oled_write_ln(PSTR("LAYER"), false);

@ -1 +1,3 @@
VIA_ENABLE = yes
OLED_ENABLE = yes
# OLED_DRIVER = not a real thing

@ -3,7 +3,7 @@
// Tested and verified working on ext65rev2
void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void board_init(void) {
SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);

@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
#define OLED_DISPLAY_128X64
#define OLED_TIMEOUT 400000
#endif

@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {

@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
#define OLED_DISPLAY_128X32
#define OLED_TIMEOUT 400000
#endif

@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {

@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
#define OLED_DISPLAY_128X64
#define OLED_TIMEOUT 400000
#endif

@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {

@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C
OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C
ENCODER_ENABLE = yes
SPLIT_KEYBOARD = yes
LTO_ENABLE = yes

@ -64,7 +64,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGBLIGHT_LIMIT_VAL 255
#endif
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
# define OLED_DISPLAY_128X64
# define OLED_TIMEOUT 60000
# define OLED_FONT_H "keyboards/anavi/macropad8/glcdfont.c"

@ -17,7 +17,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) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}

@ -100,7 +100,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) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}

@ -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) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}

@ -36,7 +36,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) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}

@ -53,7 +53,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) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}

@ -52,7 +52,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) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}

@ -24,7 +24,8 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output on port C6
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C
OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NO, KC_NO, KC_NO, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) {
oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) {

@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL),
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) {
// Host Keyboard LED Status
oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);

@ -172,7 +172,7 @@ void matrix_scan_user(void) {
#endif
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) {
oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) {

@ -28,7 +28,8 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
CUSTOM_MATRIX = yes
SRC += matrix.c

@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
#if defined(OLED_DRIVER_ENABLE)
#if defined(OLED_ENABLE)
static void render_logo(void) {
//Logo for _MEDIA
static const char PROGMEM logo1[] = {

@ -21,5 +21,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
UNICODE_ENABLE = yes # Unicode
OLED_DRIVER_ENABLE = yes # Enable Support for Oled Display
OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enable Support for Oled Display
ENCODER_ENABLE = yes # Enable Support for Encoder

@ -139,7 +139,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master()) {

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -122,7 +122,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;

@ -16,7 +16,7 @@
#pragma once
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
#define OLED_DISPLAY_128X64
#endif

@ -396,7 +396,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
#define ANIM_NUM_FRAMES 4
#define ANIM_FRAME_DURATION 100

@ -18,7 +18,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enables the use of OLED displays
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
SPLIT_KEYBOARD = yes # Split common

@ -103,7 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return result;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
const char *read_logo(void) {
static char logo[] = {

@ -103,7 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return result;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
const char *read_logo(void) {
static char logo[] = {

@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return result;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
const char *read_logo(void) {
static char logo[] = {

@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
static void render_qmk_logo(void) {
static const char PROGMEM qmk_logo[] = {

@ -27,7 +27,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
OLED_DRIVER_ENABLE = yes # Disable OLED driver.
OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Disable OLED driver.
UNICODE_ENABLE = no # Unicode
LTO_ENABLE = yes

@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RGB_MOD, KC_VOLD, KC_F1
),
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RGB_MOD, KC_3,KC_4
),
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -58,7 +58,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;

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -46,7 +46,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;

@ -1,4 +1,5 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
VIA_ENABLE = yes
EXTRAKEY_ENABLE = yes
RGBLIGHT_ENABLE = yes

@ -35,7 +35,7 @@ void keyboard_post_init_user(void) {
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD);
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,

@ -28,4 +28,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -38,7 +38,7 @@ void led_set_user(uint8_t usb_led) {}
void keyboard_post_init_user(void) {}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,

@ -28,4 +28,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -1,4 +1,4 @@
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
# include QMK_KEYBOARD_H
# include <stdio.h>
# include <string.h>

@ -1,4 +1,4 @@
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void render_logo(void);

@ -64,7 +64,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
# include <stdio.h>
# include <string.h>

@ -21,6 +21,7 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
SRC += ./common/oled_helper.c

@ -181,7 +181,7 @@ bool led_update_user(led_t led_state) {
return false;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_write_layer_state(void) {
oled_write_P(PSTR("Layer: "), false);

@ -1,2 +1,3 @@
# Enable SSD1306 OLED
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -58,7 +58,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);

@ -28,4 +28,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
ENCODER_ENABLE = yes # Enable support for encoders
OLED_DRIVER_ENABLE = yes # Enable support for OLED displays
OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enable support for OLED displays

@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void render_layer_state(void) {
switch (get_highest_layer(layer_state)) {

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -15,5 +15,5 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
OLED_DRIVER_ENABLE = no # Add OLED displays support
OLED_ENABLE = no # Add OLED displays support
SPLIT_KEYBOARD = yes

@ -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

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -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

@ -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

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -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
@ -407,4 +407,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
#endif // OLED_DRIVER_ENABLE
#endif // OLED_ENABLE

@ -1,4 +1,5 @@
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
RGBLIGHT_ENABLE = yes
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -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

@ -3,7 +3,7 @@
SRC += ./logo_reader.c
# enable OLED displays
OLED_DRIVER_ENABLE = no
OLED_ENABLE = no
# enable media keys
EXTRAKEY_ENABLE = yes

@ -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

@ -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

@ -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);

@ -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

@ -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())

@ -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 \

@ -6,7 +6,8 @@
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
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

@ -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

@ -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;

@ -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

@ -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

@ -1 +1,2 @@
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

@ -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

@ -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

@ -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

@ -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;

@ -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

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save