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

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

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

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

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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