1
0
Fork 0

[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>
This commit is contained in:
Xelus22 2021-08-24 16:28:26 +10:00 committed by GitHub
parent 6fd20acf4b
commit 4e1c5887c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
500 changed files with 1579 additions and 1387 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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[] = {

View file

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

View file

@ -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[] = {

View file

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

View file

@ -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[] = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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[] = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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[] = {

View file

@ -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[] = {

View file

@ -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[] = {

View file

@ -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[] = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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