diff --git a/common_features.mk b/common_features.mk index 3acc5307acd9..c92f98ab7f77 100644 --- a/common_features.mk +++ b/common_features.mk @@ -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) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index c90aabb9c6a4..c97843cfb37f 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -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 diff --git a/drivers/oled/oled_driver.c b/drivers/oled/ssd1306_sh1106.c similarity index 100% rename from drivers/oled/oled_driver.c rename to drivers/oled/ssd1306_sh1106.c diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c index 29e41e242af2..707dd3646b46 100644 --- a/layouts/community/split_3x6_3/drashna/keymap.c +++ b/layouts/community/split_3x6_3/drashna/keymap.c @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_270; } #endif diff --git a/layouts/community/split_3x6_3/drashna/rules.mk b/layouts/community/split_3x6_3/drashna/rules.mk index e0ac86d698eb..3a8a771ee1a7 100644 --- a/layouts/community/split_3x6_3/drashna/rules.mk +++ b/layouts/community/split_3x6_3/drashna/rules.mk @@ -20,7 +20,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifeq ($(strip $(KEYBOARD)), crkbd/rev1) - OLED_DRIVER_ENABLE = yes + OLED_ENABLE = yes RGB_MATRIX_ENABLE = yes HAPTIC_ENABLE = no BOOTLOADER = qmk-dfu diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 644d8650dde4..473306c65dc1 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -82,7 +82,7 @@ along with this program. If not, see . #ifdef QWIIC_ENABLE # include "qwiic.h" #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_driver.h" #endif #ifdef ST7565_ENABLE @@ -319,7 +319,7 @@ void keyboard_init(void) { #ifdef QWIIC_ENABLE qwiic_init(); #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_init(OLED_ROTATION_0); #endif #ifdef ST7565_ENABLE @@ -477,7 +477,7 @@ void keyboard_task(void) { qwiic_task(); #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_task(); # ifndef OLED_DISABLE_TIMEOUT // Wake up oled if user is using those fabulous keys or spinning those encoders! diff --git a/quantum/quantum.h b/quantum/quantum.h index ffb5e0df45df..86b717e445c9 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -164,7 +164,7 @@ extern layer_state_t layer_state; # include "process_haptic.h" #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_driver.h" #endif diff --git a/quantum/split_common/transaction_id_define.h b/quantum/split_common/transaction_id_define.h index 8dd2cd065f13..535bc21aeaa1 100644 --- a/quantum/split_common/transaction_id_define.h +++ b/quantum/split_common/transaction_id_define.h @@ -70,9 +70,9 @@ enum serial_transaction_id { PUT_WPM, #endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) -#if defined(OLED_DRIVER_ENABLE) && defined(SPLIT_OLED_ENABLE) +#if defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) PUT_OLED, -#endif // defined(OLED_DRIVER_ENABLE) && defined(SPLIT_OLED_ENABLE) +#endif // defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) #if defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) PUT_ST7565, diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 28ea4ef6d85e..fd676f072975 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c @@ -519,7 +519,7 @@ static void wpm_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_ //////////////////////////////////////////////////// // OLED -#if defined(OLED_DRIVER_ENABLE) && defined(SPLIT_OLED_ENABLE) +#if defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) static bool oled_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { static uint32_t last_update = 0; @@ -539,7 +539,7 @@ static void oled_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave # define TRANSACTIONS_OLED_SLAVE() TRANSACTION_HANDLER_SLAVE(oled) # define TRANSACTIONS_OLED_REGISTRATIONS [PUT_OLED] = trans_initiator2target_initializer(current_oled_state), -#else // defined(OLED_DRIVER_ENABLE) && defined(SPLIT_OLED_ENABLE) +#else // defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) # define TRANSACTIONS_OLED_MASTER() # define TRANSACTIONS_OLED_SLAVE() diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index f7abb9979e84..1d4f6ed0cd86 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h @@ -165,9 +165,9 @@ typedef struct _split_shared_memory_t { uint8_t current_wpm; #endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) -#if defined(OLED_DRIVER_ENABLE) && defined(SPLIT_OLED_ENABLE) +#if defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) uint8_t current_oled_state; -#endif // defined(OLED_DRIVER_ENABLE) && defined(SPLIT_OLED_ENABLE) +#endif // defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) #if defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) uint8_t current_st7565_state; diff --git a/show_options.mk b/show_options.mk index 8aed634dae4d..ce2f9c06360a 100644 --- a/show_options.mk +++ b/show_options.mk @@ -50,8 +50,8 @@ OTHER_OPTION_NAMES = \ STENO_ENABLE \ TAP_DANCE_ENABLE \ VIRTSER_ENABLE \ - OLED_DRIVER_ENABLE \ OLED_ENABLE \ + OLED_DRIVER \ LED_BACK_ENABLE \ LED_UNDERGLOW_ENABLE \ LED_ANIMATIONS \ diff --git a/users/curry/rules.mk b/users/curry/rules.mk index 87d3b38eadf8..724f97f5ebce 100644 --- a/users/curry/rules.mk +++ b/users/curry/rules.mk @@ -24,7 +24,7 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dances.c endif -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled.c endif diff --git a/users/drashna/config.h b/users/drashna/config.h index c8007a61b811..75e1c11c6d04 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -140,7 +140,7 @@ # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_REST_MODE #endif // RGB_MATRIX_ENABLE -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # ifdef SPLIT_KEYBOARD # define OLED_UPDATE_INTERVAL 60 # else diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 27b9b5bc99f3..13421f39d7ed 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -114,8 +114,9 @@ void shutdown_user(void) { } __attribute__((weak)) void suspend_power_down_keymap(void) {} -void suspend_power_down_user(void) { -#ifdef OLED_DRIVER_ENABLE + +void suspend_power_down_user(void) { +#ifdef OLED_ENABLE oled_off(); #endif suspend_power_down_keymap(); diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0ae5f779ae92..a1fa3ffa92c8 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -29,7 +29,7 @@ #if defined(RGB_MATRIX_ENABLE) # include "rgb_matrix_stuff.h" #endif -#if defined(OLED_DRIVER_ENABLE) +#if defined(OLED_ENABLE) # include "oled_stuff.h" #endif #if defined(PIMORONI_TRACKBALL_ENABLE) diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c index 0d63c38fa446..debcdcfbe013 100644 --- a/users/drashna/oled_stuff.c +++ b/users/drashna/oled_stuff.c @@ -70,7 +70,7 @@ void add_keylog(uint16_t keycode) { bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_timer = timer_read32(); add_keylog(keycode); #endif diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index f5e6a867aeee..900b6da15e89 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -29,7 +29,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *re #ifdef KEYLOGGER_ENABLE uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); #endif // KEYLOGGER_ENABLE -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE process_record_user_oled(keycode, record); #endif // OLED diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 02a75a7b7432..dbacae1d5616 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -64,7 +64,7 @@ ifeq ($(strip $(PROTOCOL)), VUSB) endif CUSTOM_OLED_DRIVER ?= yes -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) SRC += oled_stuff.c OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c index fdd596c04c1f..38434751e67a 100644 --- a/users/drashna/transport_sync.c +++ b/users/drashna/transport_sync.c @@ -71,6 +71,10 @@ void keyboard_post_init_transport_sync(void) { void user_transport_update(void) { if (is_keyboard_master()) { +# ifdef OLED_ENABLE + user_state.oled_on = is_oled_on(); +# endif + transport_keymap_config = keymap_config.raw; transport_userspace_config = userspace_config.raw; #ifdef AUDIO_ENABLE @@ -85,6 +89,13 @@ void user_transport_update(void) { #endif } else { +# ifdef OLED_ENABLE + if (user_state.oled_on) { + oled_on(); + } else { + oled_off(); + } +# endif keymap_config.raw = transport_keymap_config; userspace_config.raw = transport_userspace_config; #ifdef UNICODE_ENABLE diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index a3514f54f6e1..1d88c3057935 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -2,7 +2,7 @@ #include #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 a3b8417913ab..c298227e5136 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 2e69ca216323..5b901a165909 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 diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c index 6e548f1d8d84..6e6a7c23c637 100644 --- a/users/riblee/riblee.c +++ b/users/riblee/riblee.c @@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static char receive_buffer[128] = {}; static uint8_t receive_buffer_length = 0; @@ -227,4 +227,4 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { #endif -#endif \ No newline at end of file +#endif diff --git a/users/sethBarberee/sethBarberee.c b/users/sethBarberee/sethBarberee.c index 536f3f921b37..c5fceee68d63 100644 --- a/users/sethBarberee/sethBarberee.c +++ b/users/sethBarberee/sethBarberee.c @@ -58,7 +58,7 @@ void keyboard_post_init_user(void) __attribute__((weak)) void suspend_power_down_keymap(void) {} void suspend_power_down_user(void) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_off(); #endif suspend_power_down_keymap(); diff --git a/users/snowe/oled_setup.c b/users/snowe/oled_setup.c index b3e04df458e5..3d21ea9f0a13 100644 --- a/users/snowe/oled_setup.c +++ b/users/snowe/oled_setup.c @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include QMK_KEYBOARD_H # include "quantum.h" @@ -138,4 +138,4 @@ void oled_task_user(void) { } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/users/snowe/oled_setup.h b/users/snowe/oled_setup.h index 031ce6bd0878..7281dcd7666d 100644 --- a/users/snowe/oled_setup.h +++ b/users/snowe/oled_setup.h @@ -18,7 +18,7 @@ #pragma once #include "quantum.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_driver.h" # define OLED_RENDER_WPM_COUNTER " WPM: " #endif @@ -27,4 +27,4 @@ #endif #ifdef OCEAN_DREAM_ENABLE # include "ocean_dream.h" -#endif \ No newline at end of file +#endif diff --git a/users/snowe/readme_ocean_dream.md b/users/snowe/readme_ocean_dream.md index ca15dd47cdc8..688afc899824 100644 --- a/users/snowe/readme_ocean_dream.md +++ b/users/snowe/readme_ocean_dream.md @@ -41,7 +41,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ``` 4. In your `rules.mk` to make it easier to turn the animation on/off, add ```makefile -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) #... your code here... ifdef OCEAN_DREAM_ENABLE @@ -59,7 +59,8 @@ endif You're done! Now you can enable **Ocean Dream** by simply turning on the OLED feature ```makefile -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ``` And if you want to disable it without turning off the OLED Driver you can simply set diff --git a/users/snowe/rules.mk b/users/snowe/rules.mk index a6e152c1cf2c..f188c9022965 100644 --- a/users/snowe/rules.mk +++ b/users/snowe/rules.mk @@ -1,6 +1,6 @@ -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_setup.c ifdef OCEAN_DREAM_ENABLE diff --git a/users/snowe/snowe.h b/users/snowe/snowe.h index 4453b2646947..21764ca50760 100644 --- a/users/snowe/snowe.h +++ b/users/snowe/snowe.h @@ -35,7 +35,7 @@ along with this program. If not, see . //#if defined(RGB_MATRIX_ENABLE) //# include "rgb_matrix_stuff.h" //#endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_setup.h" #endif diff --git a/users/tominabox1/rules.mk b/users/tominabox1/rules.mk index a7759f802007..160dcce7b928 100644 --- a/users/tominabox1/rules.mk +++ b/users/tominabox1/rules.mk @@ -11,7 +11,8 @@ ifeq ($(strip $(KEYBOARD)), crkbd/rev1) RGB_MATRIX_ENABLE = yes EXTRAFLAGS += -flto BOOTLOADER = qmk-dfu -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 endif ifeq ($(strip $(KEYBOARD)), lazydesigners/dimple) diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c index 34fe3068ac08..e48959be9d85 100644 --- a/users/tominabox1/tominabox1.c +++ b/users/tominabox1/tominabox1.c @@ -172,10 +172,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_timer = timer_read(); oled_on(); - #endif // OLED_DRIVER_ENABLE + #endif // OLED_ENABLE switch (keycode) { case KC_BBB: if (record->event.pressed) { @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef KEYBOARD_crkbd_rev1 -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_logo(void) { static const char PROGMEM logo[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, diff --git a/users/xulkal/rules.mk b/users/xulkal/rules.mk index 8f8365ea7e67..7094191f2fa2 100644 --- a/users/xulkal/rules.mk +++ b/users/xulkal/rules.mk @@ -27,6 +27,6 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += custom_rgb.c endif -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += custom_oled.c endif