diff options
Diffstat (limited to 'users')
80 files changed, 1099 insertions, 1672 deletions
diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c index 621b9e664..99f4e0168 100644 --- a/users/333fred/333fred.c +++ b/users/333fred/333fred.c | |||
| @@ -117,7 +117,7 @@ void tap_dance_process_keycode(uint16_t keycode) { | |||
| 117 | __attribute__ ((weak)) | 117 | __attribute__ ((weak)) |
| 118 | void layer_state_set_rgb(uint32_t state) {} | 118 | void layer_state_set_rgb(uint32_t state) {} |
| 119 | 119 | ||
| 120 | uint32_t layer_state_set_user(uint32_t state) { | 120 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 121 | layer_state_set_rgb(state); | 121 | layer_state_set_rgb(state); |
| 122 | return state; | 122 | return state; |
| 123 | } | 123 | } |
diff --git a/users/bbaserdem/bbaserdem.c b/users/bbaserdem/bbaserdem.c index ac7b1b62e..cdacda12e 100644 --- a/users/bbaserdem/bbaserdem.c +++ b/users/bbaserdem/bbaserdem.c | |||
| @@ -87,7 +87,7 @@ void rgblight_saveBase(void) { | |||
| 87 | base_sta = false; // If saving, that means base layer is being left | 87 | base_sta = false; // If saving, that means base layer is being left |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | // Load the base state back | 90 | // Load the base state back |
| 91 | void rgblight_loadBase(void) { | 91 | void rgblight_loadBase(void) { |
| 92 | // Don't do anything if not enabled | 92 | // Don't do anything if not enabled |
| 93 | if ( !base_sta ) { | 93 | if ( !base_sta ) { |
| @@ -248,7 +248,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 248 | } | 248 | } |
| 249 | return false; | 249 | return false; |
| 250 | break; | 250 | break; |
| 251 | #endif | 251 | #endif |
| 252 | 252 | ||
| 253 | // If these keys are pressed, load base layer config, and mark saving | 253 | // If these keys are pressed, load base layer config, and mark saving |
| 254 | #ifdef RGBLIGHT_ENABLE | 254 | #ifdef RGBLIGHT_ENABLE |
| @@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 261 | case RGB_HUI: | 261 | case RGB_HUI: |
| 262 | case RGB_HUD: | 262 | case RGB_HUD: |
| 263 | if ( !base_sta ) { | 263 | if ( !base_sta ) { |
| 264 | rgblight_loadBase(); | 264 | rgblight_loadBase(); |
| 265 | } | 265 | } |
| 266 | return true; | 266 | return true; |
| 267 | break; | 267 | break; |
| @@ -301,7 +301,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 301 | } | 301 | } |
| 302 | return false; | 302 | return false; |
| 303 | break; | 303 | break; |
| 304 | 304 | ||
| 305 | // Layer switches with sound | 305 | // Layer switches with sound |
| 306 | case K_GAMES: | 306 | case K_GAMES: |
| 307 | if (record->event.pressed) { | 307 | if (record->event.pressed) { |
| @@ -622,7 +622,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 622 | |*-----LAYER CHANGE-----*| | 622 | |*-----LAYER CHANGE-----*| |
| 623 | \*----------------------*/ | 623 | \*----------------------*/ |
| 624 | 624 | ||
| 625 | uint32_t layer_state_set_user(uint32_t state) { | 625 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 626 | 626 | ||
| 627 | state = layer_state_set_keymap (state); | 627 | state = layer_state_set_keymap (state); |
| 628 | #ifdef RGBLIGHT_ENABLE | 628 | #ifdef RGBLIGHT_ENABLE |
diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk index 94f01cdff..9c7e78e2f 100644 --- a/users/bbaserdem/rules.mk +++ b/users/bbaserdem/rules.mk | |||
| @@ -10,14 +10,12 @@ ifndef BLUETOOTH_ENABLE | |||
| 10 | BLUETOOTH_ENABLE = no # No bluetooth | 10 | BLUETOOTH_ENABLE = no # No bluetooth |
| 11 | endif | 11 | endif |
| 12 | COMMAND_ENABLE = no # Some bootmagic thing i dont use | 12 | COMMAND_ENABLE = no # Some bootmagic thing i dont use |
| 13 | BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed | 13 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 14 | CONSOLE_ENABLE = no # Allows console output with a command | 14 | CONSOLE_ENABLE = no # Allows console output with a command |
| 15 | SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. | 15 | SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. |
| 16 | NKRO_ENABLE = no # Default is 6KRO which is plenty | 16 | NKRO_ENABLE = no # Default is 6KRO which is plenty |
| 17 | MIDI_ENABLE = no # Untested feature | 17 | MIDI_ENABLE = no # Untested feature |
| 18 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used | 18 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used |
| 19 | API_SYSEX_ENABLE = no # Allows OS to send signals. | ||
| 20 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used | ||
| 21 | 19 | ||
| 22 | # Disabling this makes it compile, i dont know why | 20 | # Disabling this makes it compile, i dont know why |
| 23 | # VARIABLE_TRACE = no # Allows debugging variables | 21 | # VARIABLE_TRACE = no # Allows debugging variables |
diff --git a/users/bcat/config.h b/users/bcat/config.h index 16188950e..5bb93f383 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | #if defined(RGB_MATRIX_ENABLE) | 34 | #if defined(RGB_MATRIX_ENABLE) |
| 35 | /* Turn off per-key RGB when the host goes to sleep. */ | 35 | /* Turn off per-key RGB when the host goes to sleep. */ |
| 36 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true | 36 | # define RGB_DISABLE_WHEN_USB_SUSPENDED |
| 37 | 37 | ||
| 38 | /* Keep per-key RGB increments consistent across keyboards. */ | 38 | /* Keep per-key RGB increments consistent across keyboards. */ |
| 39 | # undef RGB_MATRIX_HUE_STEP | 39 | # undef RGB_MATRIX_HUE_STEP |
diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index 3442a78ac..6d748875a 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | SRC += bcat.c | 1 | SRC += bcat.c |
| 2 | 2 | ||
| 3 | # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. | 3 | # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. |
| 4 | BOOTMAGIC_ENABLE = lite | 4 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite |
| 5 | 5 | ||
| 6 | # Enable media keys on all keyboards. | 6 | # Enable media keys on all keyboards. |
| 7 | EXTRAKEY_ENABLE = yes | 7 | EXTRAKEY_ENABLE = yes |
| @@ -27,7 +27,6 @@ MIDI_ENABLE = no | |||
| 27 | SLEEP_LED_ENABLE = no | 27 | SLEEP_LED_ENABLE = no |
| 28 | 28 | ||
| 29 | # Disable other unused options on all keyboards. | 29 | # Disable other unused options on all keyboards. |
| 30 | API_SYSEX_ENABLE = no | ||
| 31 | AUTO_SHIFT_ENABLE = no | 30 | AUTO_SHIFT_ENABLE = no |
| 32 | COMBO_ENABLE = no | 31 | COMBO_ENABLE = no |
| 33 | KEYBOARD_LOCK_ENABLE = no | 32 | KEYBOARD_LOCK_ENABLE = no |
diff --git a/users/billypython/billypython.c b/users/billypython/billypython.c index 7bdfe33a4..180b478d7 100644 --- a/users/billypython/billypython.c +++ b/users/billypython/billypython.c | |||
| @@ -27,6 +27,6 @@ uint32_t layer_state_set_keymap(uint32_t state) { | |||
| 27 | return state; | 27 | return state; |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | uint32_t layer_state_set_user(uint32_t state) { | 30 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 31 | return layer_state_set_keymap(state); | 31 | return layer_state_set_keymap(state); |
| 32 | } | 32 | } |
diff --git a/users/curry/config.h b/users/curry/config.h index b982dab03..e3c0a103e 100644 --- a/users/curry/config.h +++ b/users/curry/config.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #if defined(RGB_MATRIX_ENABLE) | 17 | #if defined(RGB_MATRIX_ENABLE) |
| 18 | # define RGB_MATRIX_KEYPRESSES | 18 | # define RGB_MATRIX_KEYPRESSES |
| 19 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS | 19 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS |
| 20 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true | 20 | # define RGB_DISABLE_WHEN_USB_SUSPENDED |
| 21 | 21 | ||
| 22 | # define DISABLE_RGB_MATRIX_ALPHAS_MODS | 22 | # define DISABLE_RGB_MATRIX_ALPHAS_MODS |
| 23 | # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN | 23 | # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN |
diff --git a/users/curry/rules.mk b/users/curry/rules.mk index 87d3b38ea..724f97f5e 100644 --- a/users/curry/rules.mk +++ b/users/curry/rules.mk | |||
| @@ -24,7 +24,7 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) | |||
| 24 | SRC += tap_dances.c | 24 | SRC += tap_dances.c |
| 25 | endif | 25 | endif |
| 26 | 26 | ||
| 27 | ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) | 27 | ifeq ($(strip $(OLED_ENABLE)), yes) |
| 28 | SRC += oled.c | 28 | SRC += oled.c |
| 29 | endif | 29 | endif |
| 30 | 30 | ||
diff --git a/users/cwebster2/rules.mk b/users/cwebster2/rules.mk index f39d4ebc9..3aa4d68f3 100644 --- a/users/cwebster2/rules.mk +++ b/users/cwebster2/rules.mk | |||
| @@ -2,7 +2,7 @@ AUTO_SHIFT_ENABLE = no # Enable autoshift | |||
| 2 | MOUSEKEY_ENABLE = yes | 2 | MOUSEKEY_ENABLE = yes |
| 3 | EXTRAKEY_ENABLE = yes | 3 | EXTRAKEY_ENABLE = yes |
| 4 | CONSOLE_ENABLE = no | 4 | CONSOLE_ENABLE = no |
| 5 | BOOTMAGIC_ENABLE = no | 5 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 6 | GRAVE_ESC_ENABLE = no | 6 | GRAVE_ESC_ENABLE = no |
| 7 | CONSOLE_ENABLE = no | 7 | CONSOLE_ENABLE = no |
| 8 | SPACE_CADET_ENABLE = no | 8 | SPACE_CADET_ENABLE = no |
diff --git a/users/d4mation/rules.mk b/users/d4mation/rules.mk index 3d65a2242..f677721b4 100644 --- a/users/d4mation/rules.mk +++ b/users/d4mation/rules.mk | |||
| @@ -2,7 +2,7 @@ SRC += d4mation.c \ | |||
| 2 | tap-hold.c \ | 2 | tap-hold.c \ |
| 3 | macros.c | 3 | macros.c |
| 4 | 4 | ||
| 5 | BOOTMAGIC_ENABLE = no | 5 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 6 | LTO_ENABLE = yes | 6 | LTO_ENABLE = yes |
| 7 | MOUSEKEY_ENABLE = no | 7 | MOUSEKEY_ENABLE = no |
| 8 | 8 | ||
diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h index 490607686..caa85e629 100644 --- a/users/danielo515/process_records.h +++ b/users/danielo515/process_records.h | |||
| @@ -78,8 +78,8 @@ enum layers { | |||
| 78 | #define KC_E_GT S(KC_NUBS) | 78 | #define KC_E_GT S(KC_NUBS) |
| 79 | #define KC_E_TILD ES_TILD | 79 | #define KC_E_TILD ES_TILD |
| 80 | #define KC_E_MINS ES_MINS | 80 | #define KC_E_MINS ES_MINS |
| 81 | #define KC_E_OVRR ES_OVRR | 81 | #define KC_E_OVRR ES_MORD |
| 82 | #define KC_E_APOS ES_APOS | 82 | #define KC_E_APOS ES_QUOT |
| 83 | #define KC_E_IEXL ES_IEXL | 83 | #define KC_E_IEXL ES_IEXL |
| 84 | //========== Short hand for complex key combinations | 84 | //========== Short hand for complex key combinations |
| 85 | #define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) | 85 | #define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) |
diff --git a/users/doogle999/rules.mk b/users/doogle999/rules.mk index 12698a27e..aab01b243 100644 --- a/users/doogle999/rules.mk +++ b/users/doogle999/rules.mk | |||
| @@ -2,7 +2,7 @@ SRC += doogle999.c | |||
| 2 | 2 | ||
| 3 | CFLAGS += -fstrict-aliasing -ftree-vrp | 3 | CFLAGS += -fstrict-aliasing -ftree-vrp |
| 4 | 4 | ||
| 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 5 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 6 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 6 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
| 7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 8 | CONSOLE_ENABLE = no # Console for debug(+400) | 8 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/users/draevin/rules.mk b/users/draevin/rules.mk index 7d6740493..1fc377e23 100644 --- a/users/draevin/rules.mk +++ b/users/draevin/rules.mk | |||
| @@ -7,6 +7,6 @@ TAP_DANCE_ENABLE = yes | |||
| 7 | 7 | ||
| 8 | AUDIO_ENABLE = no | 8 | AUDIO_ENABLE = no |
| 9 | BACKLIGHT_ENABLE = no | 9 | BACKLIGHT_ENABLE = no |
| 10 | BOOTMAGIC_ENABLE = no | 10 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 11 | CONSOLE_ENABLE = no | 11 | CONSOLE_ENABLE = no |
| 12 | SLEEP_LED_ENABLE = no \ No newline at end of file | 12 | SLEEP_LED_ENABLE = no \ No newline at end of file |
diff --git a/users/drashna/config.h b/users/drashna/config.h index 5f7c32ff3..75e1c11c6 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -17,57 +17,71 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | // Use custom magic number so that when switching branches, EEPROM always gets reset | 19 | // Use custom magic number so that when switching branches, EEPROM always gets reset |
| 20 | #define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 | 20 | #define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 |
| 21 | 21 | ||
| 22 | /* Set Polling rate to 1000Hz */ | 22 | /* Set Polling rate to 1000Hz */ |
| 23 | #define USB_POLLING_INTERVAL_MS 1 | 23 | #define USB_POLLING_INTERVAL_MS 1 |
| 24 | 24 | ||
| 25 | #if defined(SPLIT_KEYBOARD) | 25 | #if defined(SPLIT_KEYBOARD) |
| 26 | // # define SPLIT_TRANSPORT_MIRROR | ||
| 27 | # define SPLIT_LAYER_STATE_ENABLE | ||
| 28 | # define SPLIT_LED_STATE_ENABLE | ||
| 26 | # define SPLIT_MODS_ENABLE | 29 | # define SPLIT_MODS_ENABLE |
| 27 | # define SPLIT_TRANSPORT_MIRROR | 30 | # ifdef WPM_ENABLE |
| 28 | # define SERIAL_USE_MULTI_TRANSACTION | 31 | # define SPLIT_WPM_ENABLE |
| 29 | // # define SPLIT_NUM_TRANSACTIONS_KB 2 | 32 | # endif |
| 33 | # ifdef OLED_DRIVER_ENABLE | ||
| 34 | # define SPLIT_OLED_ENABLE | ||
| 35 | # endif | ||
| 36 | # if defined(__AVR__) && !defined(SELECT_SOFT_SERIAL_SPEED) | ||
| 37 | # define SELECT_SOFT_SERIAL_SPEED 1 | ||
| 38 | # endif | ||
| 39 | # ifdef CUSTOM_SPLIT_TRANSPORT_SYNC | ||
| 40 | # define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC, RPC_ID_USER_KEYMAP_SYNC, RPC_ID_USER_CONFIG_SYNC | ||
| 41 | # endif | ||
| 30 | #endif | 42 | #endif |
| 31 | 43 | ||
| 32 | #ifdef AUDIO_ENABLE | 44 | #ifdef AUDIO_ENABLE |
| 33 | |||
| 34 | # define AUDIO_CLICKY | 45 | # define AUDIO_CLICKY |
| 35 | # define STARTUP_SONG SONG(RICK_ROLL) | ||
| 36 | # define GOODBYE_SONG SONG(SONIC_RING) | ||
| 37 | # define DEFAULT_LAYER_SONGS \ | ||
| 38 | { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) } | ||
| 39 | |||
| 40 | # define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f | 46 | # define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f |
| 41 | 47 | ||
| 42 | # define UNICODE_SONG_MAC SONG(RICK_ROLL) | 48 | # ifdef USER_SONG_LIST |
| 43 | # define UNICODE_SONG_LNX SONG(RICK_ROLL) | 49 | # define STARTUP_SONG SONG(RICK_ROLL) |
| 44 | # define UNICODE_SONG_WIN SONG(RICK_ROLL) | 50 | # define GOODBYE_SONG SONG(SONIC_RING) |
| 45 | # define UNICODE_SONG_BSD SONG(RICK_ROLL) | 51 | # define DEFAULT_LAYER_SONGS \ |
| 46 | # define UNICODE_SONG_WINC SONG(RICK_ROLL) | 52 | { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) } |
| 53 | # define UNICODE_SONG_MAC SONG(MARIO_THEME) | ||
| 54 | # define UNICODE_SONG_LNX SONG(MARIO_POWERUP) | ||
| 55 | # define UNICODE_SONG_WIN SONG(MARIO_ONEUP) | ||
| 56 | # define UNICODE_SONG_BSD SONG(RICK_ROLL) | ||
| 57 | # define UNICODE_SONG_WINC SONG(RICK_ROLL) | ||
| 58 | # else | ||
| 59 | # define STARTUP_SONG SONG(STARTUP_SOUND) | ||
| 60 | # define GOODBYE_SONG SONG(GOODBYE_SOUND) | ||
| 61 | # define DEFAULT_LAYER_SONGS \ | ||
| 62 | { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) } | ||
| 63 | # define UNICODE_SONG_MAC SONG(QWERTY_SOUND) | ||
| 64 | # define UNICODE_SONG_LNX SONG(COLEMAK_SOUND) | ||
| 65 | # define UNICODE_SONG_WIN SONG(DVORAK_SOUND) | ||
| 66 | # define UNICODE_SONG_BSD SONG(WORKMAN_SOUND) | ||
| 67 | # define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND) | ||
| 68 | # endif | ||
| 47 | #endif // !AUDIO_ENABLE | 69 | #endif // !AUDIO_ENABLE |
| 48 | 70 | ||
| 71 | #define UNICODE_SELECTED_MODES UC_WIN, UC_MAC | ||
| 72 | |||
| 49 | #ifdef RGBLIGHT_ENABLE | 73 | #ifdef RGBLIGHT_ENABLE |
| 50 | # define RGBLIGHT_SLEEP | 74 | # define RGBLIGHT_SLEEP |
| 51 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) | 75 | # define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 |
| 52 | # undef RGBLIGHT_ANIMATIONS | 76 | # define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24 |
| 53 | # define RGBLIGHT_EFFECT_BREATHING | ||
| 54 | # define RGBLIGHT_EFFECT_SNAKE | ||
| 55 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 56 | # else | ||
| 57 | # define RGBLIGHT_ANIMATIONS | ||
| 58 | # endif | ||
| 59 | # define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 | ||
| 60 | # define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/24 | ||
| 61 | #endif // RGBLIGHT_ENABLE | 77 | #endif // RGBLIGHT_ENABLE |
| 62 | 78 | ||
| 63 | #ifdef RGB_MATRIX_ENABLE | 79 | #ifdef RGB_MATRIX_ENABLE |
| 64 | # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) | 80 | # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) |
| 65 | // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) | 81 | // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) |
| 66 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS | 82 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS |
| 67 | // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | 83 | // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects |
| 68 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | 84 | // # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended |
| 69 | // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | ||
| 70 | // # define EECONFIG_RGB_MATRIX (uint32_t *)16 | ||
| 71 | 85 | ||
| 72 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad) | 86 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad) |
| 73 | # define DISABLE_RGB_MATRIX_ALPHAS_MODS | 87 | # define DISABLE_RGB_MATRIX_ALPHAS_MODS |
| @@ -83,8 +97,10 @@ | |||
| 83 | # define DISABLE_RGB_MATRIX_CYCLE_ALL | 97 | # define DISABLE_RGB_MATRIX_CYCLE_ALL |
| 84 | # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | 98 | # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT |
| 85 | # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN | 99 | # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN |
| 86 | // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN | 100 | # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_moonlander) |
| 101 | # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
| 87 | // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | 102 | // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL |
| 103 | # endif | ||
| 88 | # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | 104 | # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON |
| 89 | # define DISABLE_RGB_MATRIX_DUAL_BEACON | 105 | # define DISABLE_RGB_MATRIX_DUAL_BEACON |
| 90 | # define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL | 106 | # define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL |
| @@ -93,6 +109,12 @@ | |||
| 93 | # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS | 109 | # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS |
| 94 | # define DISABLE_RGB_MATRIX_RAINDROPS | 110 | # define DISABLE_RGB_MATRIX_RAINDROPS |
| 95 | # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | 111 | # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS |
| 112 | # define DISABLE_RGB_MATRIX_HUE_BREATHING | ||
| 113 | # define DISABLE_RGB_MATRIX_HUE_PENDULUM | ||
| 114 | # define DISABLE_RGB_MATRIX_HUE_WAVE | ||
| 115 | # define DISABLE_RGB_MATRIX_PIXEL_RAIN | ||
| 116 | # define DISABLE_RGB_MATRIX_PIXEL_FLOW | ||
| 117 | # define DISABLE_RGB_MATRIX_PIXEL_FRACTAL | ||
| 96 | // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP | 118 | // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP |
| 97 | # define DISABLE_RGB_MATRIX_DIGITAL_RAIN | 119 | # define DISABLE_RGB_MATRIX_DIGITAL_RAIN |
| 98 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE | 120 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE |
| @@ -108,9 +130,17 @@ | |||
| 108 | # define DISABLE_RGB_MATRIX_SOLID_SPLASH | 130 | # define DISABLE_RGB_MATRIX_SOLID_SPLASH |
| 109 | # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH | 131 | # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH |
| 110 | # endif // AVR | 132 | # endif // AVR |
| 111 | #endif // RGB_MATRIX_ENABLE | 133 | # ifndef RGB_MATRIX_REST_MODE |
| 134 | # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_moonlander) | ||
| 135 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
| 136 | # else | ||
| 137 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN | ||
| 138 | # endif | ||
| 139 | # endif | ||
| 140 | # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_REST_MODE | ||
| 141 | #endif // RGB_MATRIX_ENABLE | ||
| 112 | 142 | ||
| 113 | #ifdef OLED_DRIVER_ENABLE | 143 | #ifdef OLED_ENABLE |
| 114 | # ifdef SPLIT_KEYBOARD | 144 | # ifdef SPLIT_KEYBOARD |
| 115 | # define OLED_UPDATE_INTERVAL 60 | 145 | # define OLED_UPDATE_INTERVAL 60 |
| 116 | # else | 146 | # else |
| @@ -120,7 +150,7 @@ | |||
| 120 | # ifdef OLED_FONT_H | 150 | # ifdef OLED_FONT_H |
| 121 | # undef OLED_FONT_H | 151 | # undef OLED_FONT_H |
| 122 | # endif | 152 | # endif |
| 123 | # define OLED_FONT_H "drashna_font.h" | 153 | # define OLED_FONT_H "drashna_font.h" |
| 124 | # define OLED_FONT_END 255 | 154 | # define OLED_FONT_END 255 |
| 125 | // # define OLED_FONT_5X5 | 155 | // # define OLED_FONT_5X5 |
| 126 | // # define OLED_FONT_AZTECH | 156 | // # define OLED_FONT_AZTECH |
| @@ -143,8 +173,8 @@ | |||
| 143 | 173 | ||
| 144 | #ifdef QMK_KEYS_PER_SCAN | 174 | #ifdef QMK_KEYS_PER_SCAN |
| 145 | # undef QMK_KEYS_PER_SCAN | 175 | # undef QMK_KEYS_PER_SCAN |
| 146 | # define QMK_KEYS_PER_SCAN 2 | 176 | #endif |
| 147 | #endif // !QMK_KEYS_PER_SCAN | 177 | #define QMK_KEYS_PER_SCAN 4 |
| 148 | 178 | ||
| 149 | // this makes it possible to do rolling combos (zx) with keys that | 179 | // this makes it possible to do rolling combos (zx) with keys that |
| 150 | // convert to other keys on hold (z becomes ctrl when you hold it, | 180 | // convert to other keys on hold (z becomes ctrl when you hold it, |
| @@ -152,14 +182,12 @@ | |||
| 152 | // actually sends Ctrl-x. That's bad.) | 182 | // actually sends Ctrl-x. That's bad.) |
| 153 | #define IGNORE_MOD_TAP_INTERRUPT | 183 | #define IGNORE_MOD_TAP_INTERRUPT |
| 154 | #undef PERMISSIVE_HOLD | 184 | #undef PERMISSIVE_HOLD |
| 155 | //#define TAPPING_FORCE_HOLD | 185 | //#define TAPPING_FORCE_HOLD_PER_KEY |
| 156 | //#define RETRO_TAPPING | 186 | //#define RETRO_TAPPING_PER_KEY |
| 157 | #ifndef KEYBOARD_kyria_rev1 | 187 | #if !defined(KEYBOARD_kyria) && !defined(KEYBOARD_splitkb_kyria) |
| 158 | # define TAPPING_TERM_PER_KEY | 188 | # define TAPPING_TERM_PER_KEY |
| 159 | #endif | 189 | #endif |
| 160 | 190 | ||
| 161 | #define FORCE_NKRO | ||
| 162 | |||
| 163 | #ifndef TAPPING_TOGGLE | 191 | #ifndef TAPPING_TOGGLE |
| 164 | # define TAPPING_TOGGLE 1 | 192 | # define TAPPING_TOGGLE 1 |
| 165 | #endif | 193 | #endif |
| @@ -185,14 +213,21 @@ | |||
| 185 | # undef LOCKING_RESYNC_ENABLE | 213 | # undef LOCKING_RESYNC_ENABLE |
| 186 | #endif | 214 | #endif |
| 187 | 215 | ||
| 216 | #if !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_32BIT) | ||
| 217 | # define LAYER_STATE_16BIT | ||
| 218 | #endif | ||
| 219 | #ifndef DYNAMIC_KEYMAP_LAYER_COUNT | ||
| 220 | # define DYNAMIC_KEYMAP_LAYER_COUNT 11 | ||
| 221 | #endif | ||
| 222 | |||
| 188 | #ifdef CONVERT_TO_PROTON_C | 223 | #ifdef CONVERT_TO_PROTON_C |
| 189 | // pins that are available but not present on Pro Micro | 224 | // pins that are available but not present on Pro Micro |
| 190 | # define A3 PAL_LINE(GPIOA, 3) | 225 | # define A3 PAL_LINE(GPIOA, 3) |
| 191 | # define A4 PAL_LINE(GPIOA, 4) | 226 | # define A4 PAL_LINE(GPIOA, 4) |
| 192 | # define A5 PAL_LINE(GPIOA, 5) | 227 | # define A5 PAL_LINE(GPIOA, 5) |
| 193 | # define A6 PAL_LINE(GPIOA, 6) | 228 | # define A6 PAL_LINE(GPIOA, 6) |
| 194 | # define A7 PAL_LINE(GPIOA, 7) | 229 | # define A7 PAL_LINE(GPIOA, 7) |
| 195 | # define A8 PAL_LINE(GPIOA, 8) | 230 | # define A8 PAL_LINE(GPIOA, 8) |
| 196 | # define A13 PAL_LINE(GPIOA, 13) | 231 | # define A13 PAL_LINE(GPIOA, 13) |
| 197 | # define A14 PAL_LINE(GPIOA, 14) | 232 | # define A14 PAL_LINE(GPIOA, 14) |
| 198 | # define A15 PAL_LINE(GPIOA, 15) | 233 | # define A15 PAL_LINE(GPIOA, 15) |
| @@ -203,3 +238,79 @@ | |||
| 203 | # define C14 PAL_LINE(GPIOC, 14) | 238 | # define C14 PAL_LINE(GPIOC, 14) |
| 204 | # define C15 PAL_LINE(GPIOC, 15) | 239 | # define C15 PAL_LINE(GPIOC, 15) |
| 205 | #endif | 240 | #endif |
| 241 | |||
| 242 | #ifdef MOUSEKEY_ENABLE | ||
| 243 | // mouse movement config | ||
| 244 | # ifdef MK_3_SPEED | ||
| 245 | # undef MK_3_SPEED | ||
| 246 | # endif | ||
| 247 | # define MK_KINETIC_SPEED | ||
| 248 | # ifdef MK_KINETIC_SPEED | ||
| 249 | # ifndef MOUSEKEY_DELAY | ||
| 250 | # define MOUSEKEY_DELAY 8 | ||
| 251 | # endif | ||
| 252 | # ifndef MOUSEKEY_INTERVAL | ||
| 253 | # define MOUSEKEY_INTERVAL 20 | ||
| 254 | # endif | ||
| 255 | # ifdef MOUSEKEY_MOVE_DELTA | ||
| 256 | # define MOUSEKEY_MOVE_DELTA 25 | ||
| 257 | # endif | ||
| 258 | # else | ||
| 259 | # ifndef MOUSEKEY_DELAY | ||
| 260 | # define MOUSEKEY_DELAY 300 | ||
| 261 | # endif | ||
| 262 | # ifndef MOUSEKEY_INTERVAL | ||
| 263 | # define MOUSEKEY_INTERVAL 50 | ||
| 264 | # endif | ||
| 265 | # ifndef MOUSEKEY_MOVE_DELTA | ||
| 266 | # define MOUSEKEY_MOVE_DELTA 5 | ||
| 267 | # endif | ||
| 268 | # endif | ||
| 269 | # ifndef MOUSEKEY_MAX_SPEED | ||
| 270 | # define MOUSEKEY_MAX_SPEED 7 | ||
| 271 | # endif | ||
| 272 | # ifndef MOUSEKEY_TIME_TO_MAX | ||
| 273 | # define MOUSEKEY_TIME_TO_MAX 60 | ||
| 274 | # endif | ||
| 275 | # ifndef MOUSEKEY_INITIAL_SPEED | ||
| 276 | # define MOUSEKEY_INITIAL_SPEED 100 | ||
| 277 | # endif | ||
| 278 | # ifndef MOUSEKEY_BASE_SPEED | ||
| 279 | # define MOUSEKEY_BASE_SPEED 1000 | ||
| 280 | # endif | ||
| 281 | # ifndef MOUSEKEY_DECELERATED_SPEED | ||
| 282 | # define MOUSEKEY_DECELERATED_SPEED 400 | ||
| 283 | # endif | ||
| 284 | # ifndef MOUSEKEY_ACCELERATED_SPEED | ||
| 285 | # define MOUSEKEY_ACCELERATED_SPEED 3000 | ||
| 286 | # endif | ||
| 287 | // mouse scroll config | ||
| 288 | # ifndef MOUSEKEY_WHEEL_DELAY | ||
| 289 | # define MOUSEKEY_WHEEL_DELAY 15 | ||
| 290 | # endif | ||
| 291 | # ifndef MOUSEKEY_WHEEL_DELTA | ||
| 292 | # define MOUSEKEY_WHEEL_DELTA 1 | ||
| 293 | # endif | ||
| 294 | # ifndef MOUSEKEY_WHEEL_INTERVAL | ||
| 295 | # define MOUSEKEY_WHEEL_INTERVAL 50 | ||
| 296 | # endif | ||
| 297 | # ifndef MOUSEKEY_WHEEL_MAX_SPEED | ||
| 298 | # define MOUSEKEY_WHEEL_MAX_SPEED 8 | ||
| 299 | # endif | ||
| 300 | # ifndef MOUSEKEY_WHEEL_TIME_TO_MAX | ||
| 301 | # define MOUSEKEY_WHEEL_TIME_TO_MAX 80 | ||
| 302 | # endif | ||
| 303 | // mouse scroll kinetic config | ||
| 304 | # ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS | ||
| 305 | # define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8 | ||
| 306 | # endif | ||
| 307 | # ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS | ||
| 308 | # define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48 | ||
| 309 | # endif | ||
| 310 | # ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS | ||
| 311 | # define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48 | ||
| 312 | # endif | ||
| 313 | # ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS | ||
| 314 | # define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8 | ||
| 315 | # endif | ||
| 316 | #endif // MOUSEKEY_ENABLE | ||
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index a49373726..3423e379a 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -50,8 +50,7 @@ bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this | |||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | __attribute__((weak)) void keyboard_pre_init_keymap(void) {} | 52 | __attribute__((weak)) void keyboard_pre_init_keymap(void) {} |
| 53 | 53 | void keyboard_pre_init_user(void) { | |
| 54 | void keyboard_pre_init_user(void) { | ||
| 55 | userspace_config.raw = eeconfig_read_user(); | 54 | userspace_config.raw = eeconfig_read_user(); |
| 56 | keyboard_pre_init_keymap(); | 55 | keyboard_pre_init_keymap(); |
| 57 | } | 56 | } |
| @@ -59,12 +58,11 @@ void keyboard_pre_init_user(void) { | |||
| 59 | // This allows for a global, userspace functions, and continued | 58 | // This allows for a global, userspace functions, and continued |
| 60 | // customization of the keymap. Use _keymap instead of _user | 59 | // customization of the keymap. Use _keymap instead of _user |
| 61 | // functions in the keymaps | 60 | // functions in the keymaps |
| 62 | __attribute__((weak)) void matrix_init_keymap(void) {} | ||
| 63 | __attribute__((weak)) void matrix_init_secret(void) {} | ||
| 64 | |||
| 65 | // Call user matrix init, set default RGB colors and then | 61 | // Call user matrix init, set default RGB colors and then |
| 66 | // call the keymap's init function | 62 | // call the keymap's init function |
| 67 | void matrix_init_user(void) { | 63 | __attribute__((weak)) void matrix_init_keymap(void) {} |
| 64 | __attribute__((weak)) void matrix_init_secret(void) {} | ||
| 65 | void matrix_init_user(void) { | ||
| 68 | #if defined(BOOTLOADER_CATERINA) && defined(__AVR__) | 66 | #if defined(BOOTLOADER_CATERINA) && defined(__AVR__) |
| 69 | DDRD &= ~(1 << 5); | 67 | DDRD &= ~(1 << 5); |
| 70 | PORTD &= ~(1 << 5); | 68 | PORTD &= ~(1 << 5); |
| @@ -75,27 +73,33 @@ void matrix_init_user(void) { | |||
| 75 | 73 | ||
| 76 | matrix_init_secret(); | 74 | matrix_init_secret(); |
| 77 | matrix_init_keymap(); | 75 | matrix_init_keymap(); |
| 76 | #if defined(AUDIO_ENABLE) && defined(SPLIT_KEYBOARD) | ||
| 77 | if (!is_keyboard_master()) { | ||
| 78 | stop_all_notes(); | ||
| 79 | } | ||
| 80 | #endif | ||
| 78 | } | 81 | } |
| 79 | 82 | ||
| 80 | __attribute__((weak)) void keyboard_post_init_keymap(void) {} | 83 | __attribute__((weak)) void keyboard_post_init_keymap(void) {} |
| 81 | 84 | void keyboard_post_init_user(void) { | |
| 82 | void keyboard_post_init_user(void) { | ||
| 83 | #if defined(RGBLIGHT_ENABLE) | 85 | #if defined(RGBLIGHT_ENABLE) |
| 84 | keyboard_post_init_rgb_light(); | 86 | keyboard_post_init_rgb_light(); |
| 85 | #endif | 87 | #endif |
| 86 | #if defined(RGB_MATRIX_ENABLE) | 88 | #if defined(RGB_MATRIX_ENABLE) |
| 87 | keyboard_post_init_rgb_matrix(); | 89 | keyboard_post_init_rgb_matrix(); |
| 88 | #endif | 90 | #endif |
| 91 | #if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER) | ||
| 92 | keyboard_post_init_transport_sync(); | ||
| 93 | #endif | ||
| 89 | keyboard_post_init_keymap(); | 94 | keyboard_post_init_keymap(); |
| 90 | } | 95 | } |
| 91 | 96 | ||
| 92 | __attribute__((weak)) void shutdown_keymap(void) {} | ||
| 93 | |||
| 94 | #ifdef RGB_MATRIX_ENABLE | 97 | #ifdef RGB_MATRIX_ENABLE |
| 95 | void rgb_matrix_update_pwm_buffers(void); | 98 | void rgb_matrix_update_pwm_buffers(void); |
| 96 | #endif | 99 | #endif |
| 97 | 100 | ||
| 98 | void shutdown_user(void) { | 101 | __attribute__((weak)) void shutdown_keymap(void) {} |
| 102 | void shutdown_user(void) { | ||
| 99 | #ifdef RGBLIGHT_ENABLE | 103 | #ifdef RGBLIGHT_ENABLE |
| 100 | rgblight_enable_noeeprom(); | 104 | rgblight_enable_noeeprom(); |
| 101 | rgblight_mode_noeeprom(1); | 105 | rgblight_mode_noeeprom(1); |
| @@ -112,23 +116,28 @@ void shutdown_user(void) { | |||
| 112 | __attribute__((weak)) void suspend_power_down_keymap(void) {} | 116 | __attribute__((weak)) void suspend_power_down_keymap(void) {} |
| 113 | 117 | ||
| 114 | void suspend_power_down_user(void) { | 118 | void suspend_power_down_user(void) { |
| 115 | #ifdef OLED_DRIVER_ENABLE | 119 | #ifdef OLED_ENABLE |
| 116 | oled_off(); | 120 | oled_off(); |
| 117 | #endif | 121 | #endif |
| 118 | suspend_power_down_keymap(); | 122 | suspend_power_down_keymap(); |
| 119 | } | 123 | } |
| 120 | 124 | ||
| 121 | __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} | 125 | __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} |
| 122 | 126 | void suspend_wakeup_init_user(void) { | |
| 123 | void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } | 127 | if (layer_state_is(_GAMEPAD)) { |
| 124 | 128 | layer_off(_GAMEPAD); | |
| 125 | __attribute__((weak)) void matrix_scan_keymap(void) {} | 129 | } |
| 126 | 130 | if (layer_state_is(_DIABLO)) { | |
| 127 | __attribute__((weak)) void matrix_scan_secret(void) {} | 131 | layer_off(_DIABLO); |
| 132 | } | ||
| 133 | suspend_wakeup_init_keymap(); | ||
| 134 | } | ||
| 128 | 135 | ||
| 129 | // No global matrix scan code, so just run keymap's matrix | 136 | // No global matrix scan code, so just run keymap's matrix |
| 130 | // scan function | 137 | // scan function |
| 131 | void matrix_scan_user(void) { | 138 | __attribute__((weak)) void matrix_scan_keymap(void) {} |
| 139 | __attribute__((weak)) void matrix_scan_secret(void) {} | ||
| 140 | void matrix_scan_user(void) { | ||
| 132 | static bool has_ran_yet; | 141 | static bool has_ran_yet; |
| 133 | if (!has_ran_yet) { | 142 | if (!has_ran_yet) { |
| 134 | has_ran_yet = true; | 143 | has_ran_yet = true; |
| @@ -155,16 +164,14 @@ void matrix_scan_user(void) { | |||
| 155 | float doom_song[][2] = SONG(E1M1_DOOM); | 164 | float doom_song[][2] = SONG(E1M1_DOOM); |
| 156 | #endif | 165 | #endif |
| 157 | 166 | ||
| 158 | __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 159 | |||
| 160 | // on layer change, no matter where the change was initiated | 167 | // on layer change, no matter where the change was initiated |
| 161 | // Then runs keymap's layer change check | 168 | // Then runs keymap's layer change check |
| 162 | layer_state_t layer_state_set_user(layer_state_t state) { | 169 | __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } |
| 170 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 163 | if (!is_keyboard_master()) { | 171 | if (!is_keyboard_master()) { |
| 164 | return state; | 172 | return state; |
| 165 | } | 173 | } |
| 166 | 174 | ||
| 167 | state = layer_state_set_keymap(state); | ||
| 168 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | 175 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); |
| 169 | #if defined(RGBLIGHT_ENABLE) | 176 | #if defined(RGBLIGHT_ENABLE) |
| 170 | state = layer_state_set_rgb_light(state); | 177 | state = layer_state_set_rgb_light(state); |
| @@ -180,13 +187,13 @@ layer_state_t layer_state_set_user(layer_state_t state) { | |||
| 180 | } | 187 | } |
| 181 | } | 188 | } |
| 182 | #endif | 189 | #endif |
| 190 | state = layer_state_set_keymap(state); | ||
| 183 | return state; | 191 | return state; |
| 184 | } | 192 | } |
| 185 | 193 | ||
| 186 | __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 187 | |||
| 188 | // Runs state check and changes underglow color and animation | 194 | // Runs state check and changes underglow color and animation |
| 189 | layer_state_t default_layer_state_set_user(layer_state_t state) { | 195 | __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } |
| 196 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
| 190 | if (!is_keyboard_master()) { | 197 | if (!is_keyboard_master()) { |
| 191 | return state; | 198 | return state; |
| 192 | } | 199 | } |
| @@ -201,22 +208,14 @@ layer_state_t default_layer_state_set_user(layer_state_t state) { | |||
| 201 | } | 208 | } |
| 202 | 209 | ||
| 203 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} | 210 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} |
| 204 | 211 | void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } | |
| 205 | // Any custom LED code goes here. | ||
| 206 | // So far, I only have keyboard specific code, | ||
| 207 | // So nothing goes here. | ||
| 208 | void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } | ||
| 209 | 212 | ||
| 210 | __attribute__((weak)) void eeconfig_init_keymap(void) {} | 213 | __attribute__((weak)) void eeconfig_init_keymap(void) {} |
| 211 | 214 | void eeconfig_init_user(void) { | |
| 212 | void eeconfig_init_user(void) { | ||
| 213 | userspace_config.raw = 0; | 215 | userspace_config.raw = 0; |
| 214 | userspace_config.rgb_layer_change = true; | 216 | userspace_config.rgb_layer_change = true; |
| 215 | eeconfig_update_user(userspace_config.raw); | 217 | eeconfig_update_user(userspace_config.raw); |
| 216 | eeconfig_init_keymap(); | 218 | eeconfig_init_keymap(); |
| 217 | #ifdef VIA_ENABLE | ||
| 218 | via_eeprom_reset(); | ||
| 219 | #endif | ||
| 220 | keyboard_init(); | 219 | keyboard_init(); |
| 221 | } | 220 | } |
| 222 | 221 | ||
| @@ -226,3 +225,39 @@ bool hasAllBitsInMask(uint8_t value, uint8_t mask) { | |||
| 226 | 225 | ||
| 227 | return (value & mask) == mask; | 226 | return (value & mask) == mask; |
| 228 | } | 227 | } |
| 228 | |||
| 229 | #ifdef SPLIT_KEYBOARD | ||
| 230 | # if defined(AUDIO_ENABLE) | ||
| 231 | bool delayed_tasks_run = false; | ||
| 232 | # endif | ||
| 233 | __attribute__((weak)) void matrix_slave_scan_keymap(void) {} | ||
| 234 | void matrix_slave_scan_user(void) { | ||
| 235 | # if defined(AUDIO_ENABLE) | ||
| 236 | # if !defined(NO_MUSIC_MODE) | ||
| 237 | music_task(); | ||
| 238 | # endif | ||
| 239 | if (!is_keyboard_master()) { | ||
| 240 | static uint16_t delayed_task_timer = 0; | ||
| 241 | if (!delayed_tasks_run) { | ||
| 242 | if (!delayed_task_timer) { | ||
| 243 | delayed_task_timer = timer_read(); | ||
| 244 | } else if (timer_elapsed(delayed_task_timer) > 300) { | ||
| 245 | audio_startup(); | ||
| 246 | delayed_tasks_run = true; | ||
| 247 | } | ||
| 248 | } | ||
| 249 | } | ||
| 250 | # endif | ||
| 251 | # ifdef SEQUENCER_ENABLE | ||
| 252 | sequencer_task(); | ||
| 253 | # endif | ||
| 254 | # ifdef LED_MATRIX_ENABLE | ||
| 255 | led_matrix_task(); | ||
| 256 | # endif | ||
| 257 | # ifdef HAPTIC_ENABLE | ||
| 258 | haptic_task(); | ||
| 259 | # endif | ||
| 260 | |||
| 261 | matrix_slave_scan_keymap(); | ||
| 262 | } | ||
| 263 | #endif | ||
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index e66f10657..af26fdc43 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -29,34 +29,61 @@ | |||
| 29 | #if defined(RGB_MATRIX_ENABLE) | 29 | #if defined(RGB_MATRIX_ENABLE) |
| 30 | # include "rgb_matrix_stuff.h" | 30 | # include "rgb_matrix_stuff.h" |
| 31 | #endif | 31 | #endif |
| 32 | #if defined(OLED_DRIVER_ENABLE) | 32 | #if defined(OLED_ENABLE) |
| 33 | # include "oled_stuff.h" | 33 | # include "oled_stuff.h" |
| 34 | #endif | 34 | #endif |
| 35 | #if defined(PIMORONI_TRACKBALL_ENABLE) | 35 | #if defined(PIMORONI_TRACKBALL_ENABLE) |
| 36 | # include "pimoroni_trackball.h" | 36 | # include "drivers/sensors/pimoroni_trackball.h" |
| 37 | #endif | ||
| 38 | #ifdef SPLIT_KEYBOARD | ||
| 39 | # include "transport_sync.h" | ||
| 37 | #endif | 40 | #endif |
| 38 | 41 | ||
| 39 | /* Define layer names */ | 42 | /* Define layer names */ |
| 40 | enum userspace_layers { | 43 | enum userspace_layers { |
| 41 | _QWERTY = 0, | 44 | _QWERTY = 0, |
| 42 | _NUMLOCK = 0, | 45 | _NUMLOCK = 0, |
| 46 | FIRST_DEFAULT_LAYER = 0, | ||
| 47 | _COLEMAK_DH, | ||
| 43 | _COLEMAK, | 48 | _COLEMAK, |
| 44 | _DVORAK, | 49 | _DVORAK, |
| 45 | _WORKMAN, | 50 | LAST_DEFAULT_LAYER = _DVORAK, |
| 46 | _NORMAN, | ||
| 47 | _MALTRON, | ||
| 48 | _EUCALYN, | ||
| 49 | _CARPLAX, | ||
| 50 | _GAMEPAD, | 51 | _GAMEPAD, |
| 51 | _DIABLO, | 52 | _DIABLO, |
| 52 | _MACROS, | 53 | _MOUSE, |
| 53 | _MEDIA, | 54 | _MEDIA, |
| 54 | _LOWER, | 55 | _LOWER, |
| 55 | _RAISE, | 56 | _RAISE, |
| 56 | _ADJUST, | 57 | _ADJUST, |
| 57 | }; | 58 | }; |
| 58 | 59 | ||
| 59 | #define _MOUSE _MACROS | 60 | #define _MACROS _MOUSE |
| 61 | #define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER | ||
| 62 | #define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1) | ||
| 63 | #define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2) | ||
| 64 | #define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 3) | ||
| 65 | #if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 3) | ||
| 66 | # define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 4) | ||
| 67 | # define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 5) | ||
| 68 | # define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 6) | ||
| 69 | # define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 7) | ||
| 70 | # if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 7) | ||
| 71 | # define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 8) | ||
| 72 | # define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 9) | ||
| 73 | # define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 10) | ||
| 74 | # define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 11) | ||
| 75 | # endif | ||
| 76 | #endif | ||
| 77 | |||
| 78 | #define DEFAULT_LAYER_1_HSV HSV_CYAN | ||
| 79 | #define DEFAULT_LAYER_2_HSV HSV_CHARTREUSE | ||
| 80 | #define DEFAULT_LAYER_3_HSV HSV_MAGENTA | ||
| 81 | #define DEFAULT_LAYER_4_HSV HSV_GOLDENROD | ||
| 82 | |||
| 83 | #define DEFAULT_LAYER_1_RGB RGB_CYAN | ||
| 84 | #define DEFAULT_LAYER_2_RGB RGB_CHARTREUSE | ||
| 85 | #define DEFAULT_LAYER_3_RGB RGB_MAGENTA | ||
| 86 | #define DEFAULT_LAYER_4_RGB RGB_GOLDENROD | ||
| 60 | 87 | ||
| 61 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); | 88 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); |
| 62 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); | 89 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); |
| @@ -72,6 +99,9 @@ layer_state_t default_layer_state_set_keymap(layer_state_t state); | |||
| 72 | void led_set_keymap(uint8_t usb_led); | 99 | void led_set_keymap(uint8_t usb_led); |
| 73 | void eeconfig_init_keymap(void); | 100 | void eeconfig_init_keymap(void); |
| 74 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); | 101 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); |
| 102 | #ifdef SPLIT_KEYBOARD | ||
| 103 | void matrix_slave_scan_keymap(void); | ||
| 104 | #endif | ||
| 75 | 105 | ||
| 76 | // clang-format off | 106 | // clang-format off |
| 77 | typedef union { | 107 | typedef union { |
| @@ -104,7 +134,3 @@ We use custom codes here, so we can substitute the right stuff | |||
| 104 | # define KC_D3_3 KC_3 | 134 | # define KC_D3_3 KC_3 |
| 105 | # define KC_D3_4 KC_4 | 135 | # define KC_D3_4 KC_4 |
| 106 | #endif // TAP_DANCE_ENABLE | 136 | #endif // TAP_DANCE_ENABLE |
| 107 | |||
| 108 | #if defined(DRASHNA_CUSTOM_TRANSPORT) && defined(POINTING_DEVICE_ENABLE) | ||
| 109 | void master_mouse_send(int8_t x, int8_t y); | ||
| 110 | #endif | ||
diff --git a/users/drashna/drashna_font.h b/users/drashna/drashna_font.h index 6a3865a44..e9353e62a 100644 --- a/users/drashna/drashna_font.h +++ b/users/drashna/drashna_font.h | |||
| @@ -3,10 +3,14 @@ | |||
| 3 | // additional fonts from | 3 | // additional fonts from |
| 4 | // https://github.com/datacute/TinyOLED-Fonts | 4 | // https://github.com/datacute/TinyOLED-Fonts |
| 5 | 5 | ||
| 6 | #include "progmem.h" | 6 | #if __has_include("../../../../Documents/qmk/oled_font.h") |
| 7 | # include "../../../../Documents/qmk/oled_font.h" | ||
| 8 | #else | ||
| 9 | # include "progmem.h" | ||
| 7 | 10 | ||
| 11 | // clang-format off | ||
| 8 | static const unsigned char font[] PROGMEM = { | 12 | static const unsigned char font[] PROGMEM = { |
| 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00 0 | 13 | 0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, // 0x00 0 |
| 10 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, // 0x01 1 | 14 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, // 0x01 1 |
| 11 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x02 2 | 15 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x02 2 |
| 12 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 3 ♥ | 16 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 3 ♥ |
| @@ -38,7 +42,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 38 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D 29 ↭ | 42 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D 29 ↭ |
| 39 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E 30 | 43 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E 30 |
| 40 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F 31 | 44 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F 31 |
| 41 | #if defined(OLED_FONT_5X5) | 45 | # if defined(OLED_FONT_5X5) |
| 42 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 | 46 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 |
| 43 | 0x5c,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! | 47 | 0x5c,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! |
| 44 | 0x06,0x00,0x06,0x00,0x00,0x00, // 0x22 34 " | 48 | 0x06,0x00,0x06,0x00,0x00,0x00, // 0x22 34 " |
| @@ -135,7 +139,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 135 | 0x44,0x7c,0x10,0x00,0x00,0x00, // 0x7D 125 } | 139 | 0x44,0x7c,0x10,0x00,0x00,0x00, // 0x7D 125 } |
| 136 | 0x02,0x01,0x02,0x01,0x00,0x00, // 0x7E 126 ~ | 140 | 0x02,0x01,0x02,0x01,0x00,0x00, // 0x7E 126 ~ |
| 137 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 | 141 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 |
| 138 | #elif defined(OLED_FONT_AZTECH) | 142 | # lif defined(OLED_FONT_AZTECH) |
| 139 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 | 143 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 |
| 140 | 0x00,0x2e,0x00,0x00,0x00,0x00, // 0x21 33 ! | 144 | 0x00,0x2e,0x00,0x00,0x00,0x00, // 0x21 33 ! |
| 141 | 0x00,0x02,0x00,0x02,0x00,0x00, // 0x22 34 " | 145 | 0x00,0x02,0x00,0x02,0x00,0x00, // 0x22 34 " |
| @@ -232,7 +236,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 232 | 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } | 236 | 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } |
| 233 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E 126 ~ | 237 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E 126 ~ |
| 234 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 | 238 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 |
| 235 | #elif defined(OLED_FONT_BMPLAIN) | 239 | # elif defined(OLED_FONT_BMPLAIN) |
| 236 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 | 240 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 |
| 237 | 0x2e,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! | 241 | 0x2e,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! |
| 238 | 0x03,0x00,0x03,0x00,0x00,0x00, // 0x22 34 " | 242 | 0x03,0x00,0x03,0x00,0x00,0x00, // 0x22 34 " |
| @@ -329,7 +333,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 329 | 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } | 333 | 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } |
| 330 | 0x01,0x01,0x01,0x00,0x00,0x00, // 0x7E 126 ~ | 334 | 0x01,0x01,0x01,0x00,0x00,0x00, // 0x7E 126 ~ |
| 331 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 | 335 | 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 |
| 332 | #elif defined(OLED_FONT_SUPER_DIGG) | 336 | # elif defined(OLED_FONT_SUPER_DIGG) |
| 333 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 | 337 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 |
| 334 | 0x58, 0x5C, 0x00, 0x00, 0x00, 0x00, // 0x21 33 ! | 338 | 0x58, 0x5C, 0x00, 0x00, 0x00, 0x00, // 0x21 33 ! |
| 335 | 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, // 0x22 34 " | 339 | 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, // 0x22 34 " |
| @@ -426,7 +430,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 426 | 0xC2, 0xFE, 0x10, 0x00, 0x00, 0x00, // 0x7D 125 } | 430 | 0xC2, 0xFE, 0x10, 0x00, 0x00, 0x00, // 0x7D 125 } |
| 427 | 0x02, 0x01, 0x03, 0x04, 0x06, 0x02, // 0x7E 126 ~ | 431 | 0x02, 0x01, 0x03, 0x04, 0x06, 0x02, // 0x7E 126 ~ |
| 428 | 0x3C, 0x22, 0x21, 0x22, 0x3C, 0x00, // 0x7F 127 | 432 | 0x3C, 0x22, 0x21, 0x22, 0x3C, 0x00, // 0x7F 127 |
| 429 | #else // default font | 433 | # else // default font |
| 430 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 | 434 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 |
| 431 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 33 ! | 435 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 33 ! |
| 432 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 34 " | 436 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 34 " |
| @@ -523,9 +527,9 @@ static const unsigned char font[] PROGMEM = { | |||
| 523 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D 125 } | 527 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D 125 } |
| 524 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E 126 ~ | 528 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E 126 ~ |
| 525 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F 127 | 529 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F 127 |
| 526 | #endif | 530 | # endif |
| 527 | 531 | ||
| 528 | #if defined(OLED_LOGO_GMK_BAD) | 532 | # if defined(OLED_LOGO_GMK_BAD) |
| 529 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 | 533 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 |
| 530 | 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, // 0x81 | 534 | 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, // 0x81 |
| 531 | 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, // 0x82 | 535 | 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, // 0x82 |
| @@ -654,7 +658,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 654 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 658 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 655 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 659 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 656 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 660 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 657 | #elif defined(OLED_LOGO_HUE_MANITEE) | 661 | # elif defined(OLED_LOGO_HUE_MANITEE) |
| 658 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 | 662 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 |
| 659 | 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, | 663 | 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, |
| 660 | 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, | 664 | 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, |
| @@ -783,7 +787,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 783 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 787 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 784 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 788 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 785 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 789 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 786 | #elif defined(OLED_LOGO_CORNE) | 790 | # elif defined(OLED_LOGO_CORNE) |
| 787 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 | 791 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 |
| 788 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 792 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 789 | 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, | 793 | 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, |
| @@ -913,7 +917,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 913 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 917 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 914 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 918 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 915 | 919 | ||
| 916 | #elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c | 920 | # elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c |
| 917 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 | 921 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 |
| 918 | 0x00, 0x00, 0xC0, 0x60, 0x30, 0x18, | 922 | 0x00, 0x00, 0xC0, 0x60, 0x30, 0x18, |
| 919 | 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, | 923 | 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, |
| @@ -1042,137 +1046,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 1042 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 1046 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1043 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 1047 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1044 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 1048 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1045 | 1049 | # else | |
| 1046 | #elif defined(OLED_LOGO_SCIFI) | ||
| 1047 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1048 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1049 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 1050 | 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0x60, | ||
| 1051 | 0x70, 0x30, 0x38, 0x18, 0x0C, 0x0C, | ||
| 1052 | 0x1E, 0x0C, 0x80, 0x00, 0x00, 0x00, | ||
| 1053 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 1054 | 0xC0, 0xE0, 0xF0, 0x38, 0x1C, 0x0E, | ||
| 1055 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1056 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 1057 | 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, | ||
| 1058 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1059 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1060 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 1061 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | ||
| 1062 | 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, | ||
| 1063 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1064 | 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, | ||
| 1065 | 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, | ||
| 1066 | 0xC0, 0x60, 0x60, 0x30, 0x10, 0x00, | ||
| 1067 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1068 | 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, | ||
| 1069 | 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, | ||
| 1070 | 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, | ||
| 1071 | 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 1072 | 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, | ||
| 1073 | 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, | ||
| 1074 | 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, | ||
| 1075 | 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, | ||
| 1076 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1077 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1078 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1079 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, | ||
| 1080 | 0x30, 0x30, 0x70, 0x78, 0x78, 0x7C, | ||
| 1081 | 0x7C, 0x7E, 0x3E, 0x3F, 0x3F, 0x3B, | ||
| 1082 | 0x3B, 0x39, 0x39, 0x38, 0x38, 0x38, | ||
| 1083 | 0x38, 0x38, 0x38, 0x38, 0x3C, 0x38, | ||
| 1084 | 0x18, 0x8F, 0xDF, 0xF8, 0x7C, 0xBE, | ||
| 1085 | 0xDF, 0xF7, 0xFB, 0xFD, 0xFE, 0xEF, | ||
| 1086 | 0x73, 0x3B, 0x1B, 0x1F, 0xEF, 0xF7, | ||
| 1087 | 0xFF, 0x7E, 0x6F, 0x6F, 0x6F, 0x6F, | ||
| 1088 | 0x6D, 0xBD, 0xE1, 0xF9, 0x3F, 0x3F, | ||
| 1089 | 0x39, 0x79, 0x79, 0x7D, 0xED, 0xED, | ||
| 1090 | 0xCD, 0xC7, 0xC7, 0x87, 0xC7, 0xE3, | ||
| 1091 | 0xE0, 0xF8, 0x7E, 0x3F, 0x37, 0x33, | ||
| 1092 | 0x3B, 0x1B, 0x19, 0x19, 0x0D, 0xED, | ||
| 1093 | 0xFF, 0xBF, 0xC7, 0xE7, 0xE3, 0xF0, | ||
| 1094 | 0x7C, 0xDE, 0xE7, 0xFB, 0x3E, 0x3F, | ||
| 1095 | 0xFC, 0xE0, 0xF8, 0x3E, 0xCF, 0xF3, | ||
| 1096 | 0xFC, 0x3F, 0x1F, 0x1F, 0x3C, 0x7E, | ||
| 1097 | 0x76, 0xF3, 0xE3, 0x81, 0x01, 0x00, | ||
| 1098 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1099 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1100 | 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 1101 | 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, | ||
| 1102 | 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, | ||
| 1103 | 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 1104 | 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, | ||
| 1105 | 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, | ||
| 1106 | 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, | ||
| 1107 | 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, | ||
| 1108 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1109 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1110 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1112 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1113 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1114 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1115 | 0x00, 0x00, 0x20, 0x30, 0x18, 0x1E, | ||
| 1116 | 0x0F, 0x03, 0x01, 0x00, 0x00, 0x00, | ||
| 1117 | 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, | ||
| 1118 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1119 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1120 | 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, | ||
| 1121 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1122 | 0x00, 0x01, 0xE1, 0x79, 0x3E, 0x1F, | ||
| 1123 | 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, | ||
| 1124 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, | ||
| 1125 | 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, | ||
| 1126 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1127 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
| 1128 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1129 | 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, | ||
| 1130 | 0x02, 0x06, 0x04, 0x08, 0x18, 0x10, | ||
| 1131 | 0x30, 0x20, 0x60, 0x00, 0x00, 0x00, | ||
| 1132 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1133 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1134 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1135 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1137 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1138 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1139 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1140 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1141 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1143 | 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, | ||
| 1144 | 0x00, 0x14, 0x08, 0x14, 0x00, 0x00, | ||
| 1145 | 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, | ||
| 1146 | 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00, | ||
| 1147 | 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, | ||
| 1148 | 0x06, 0x0C, 0x18, 0x30, 0x00, 0x00, | ||
| 1149 | 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C, | ||
| 1150 | 0x18, 0x30, 0x66, 0x66, 0x66, 0x00, | ||
| 1151 | 0x00, 0x00, 0x00, 0x08, 0x0C, 0x7E, | ||
| 1152 | 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00, | ||
| 1153 | 0x00, 0x00, 0x77, 0x77, 0x77, 0x00, | ||
| 1154 | 0x77, 0x77, 0x77, 0x00, 0x00, 0x00, | ||
| 1155 | 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24, | ||
| 1156 | 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00, | ||
| 1157 | 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1, | ||
| 1158 | 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00, | ||
| 1159 | 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED, | ||
| 1160 | 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00, | ||
| 1161 | 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F, | ||
| 1162 | 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00, | ||
| 1163 | 0x00, 0x00, 0x40, 0x60, 0x6A, 0x64, | ||
| 1164 | 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00, | ||
| 1165 | 0x00, 0x04, 0x42, 0x69, 0x65, 0x65, | ||
| 1166 | 0x65, 0x69, 0x42, 0x04, 0x00, 0x00, | ||
| 1167 | 0x00, 0x00, 0x1C, 0x14, 0x1C, 0x08, | ||
| 1168 | 0x18, 0x08, 0x18, 0x00, 0x00, 0x00, | ||
| 1169 | 0x00, 0x70, 0xC8, 0xEE, 0xF9, 0x70, | ||
| 1170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1171 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 1174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 1175 | #else | ||
| 1176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 | 1050 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 |
| 1177 | 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, | 1051 | 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, |
| 1178 | 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, | 1052 | 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, |
| @@ -1302,5 +1176,7 @@ static const unsigned char font[] PROGMEM = { | |||
| 1302 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 1176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1303 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 1177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1304 | 1178 | ||
| 1305 | #endif | 1179 | # endif |
| 1306 | }; | 1180 | }; |
| 1181 | // clang-format on | ||
| 1182 | #endif | ||
diff --git a/users/drashna/drashna_transport.c b/users/drashna/drashna_transport.c deleted file mode 100644 index 9df11c9bd..000000000 --- a/users/drashna/drashna_transport.c +++ /dev/null | |||
| @@ -1,603 +0,0 @@ | |||
| 1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <string.h> | ||
| 18 | #include <stddef.h> | ||
| 19 | |||
| 20 | #include "matrix.h" | ||
| 21 | #include QMK_KEYBOARD_H | ||
| 22 | |||
| 23 | #define ROWS_PER_HAND (MATRIX_ROWS / 2) | ||
| 24 | #define SYNC_TIMER_OFFSET 2 | ||
| 25 | |||
| 26 | #ifdef RGBLIGHT_ENABLE | ||
| 27 | # include "rgblight.h" | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #ifdef BACKLIGHT_ENABLE | ||
| 31 | # include "backlight.h" | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #ifdef ENCODER_ENABLE | ||
| 35 | # include "encoder.h" | ||
| 36 | static pin_t encoders_pad[] = ENCODERS_PAD_A; | ||
| 37 | # define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t)) | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #ifdef POINTING_DEVICE_ENABLE | ||
| 41 | static uint16_t device_cpi = 0; | ||
| 42 | static int8_t split_mouse_x = 0, split_mouse_y = 0; | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #ifdef OLED_DRIVER_ENABLE | ||
| 46 | # include "oled_driver.h" | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | ||
| 50 | # include "led_matrix.h" | ||
| 51 | #endif | ||
| 52 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 53 | # include "rgb_matrix.h" | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #if defined(USE_I2C) | ||
| 57 | |||
| 58 | # include "i2c_master.h" | ||
| 59 | # include "i2c_slave.h" | ||
| 60 | |||
| 61 | typedef struct _I2C_slave_buffer_t { | ||
| 62 | # ifndef DISABLE_SYNC_TIMER | ||
| 63 | uint32_t sync_timer; | ||
| 64 | # endif | ||
| 65 | # ifdef SPLIT_TRANSPORT_MIRROR | ||
| 66 | matrix_row_t mmatrix[ROWS_PER_HAND]; | ||
| 67 | # endif | ||
| 68 | matrix_row_t smatrix[ROWS_PER_HAND]; | ||
| 69 | # ifdef SPLIT_MODS_ENABLE | ||
| 70 | uint8_t real_mods; | ||
| 71 | uint8_t weak_mods; | ||
| 72 | # ifndef NO_ACTION_ONESHOT | ||
| 73 | uint8_t oneshot_mods; | ||
| 74 | # endif | ||
| 75 | # endif | ||
| 76 | # ifdef BACKLIGHT_ENABLE | ||
| 77 | uint8_t backlight_level; | ||
| 78 | # endif | ||
| 79 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 80 | rgblight_syncinfo_t rgblight_sync; | ||
| 81 | # endif | ||
| 82 | # ifdef ENCODER_ENABLE | ||
| 83 | uint8_t encoder_state[NUMBER_OF_ENCODERS]; | ||
| 84 | # endif | ||
| 85 | # ifdef WPM_ENABLE | ||
| 86 | uint8_t current_wpm; | ||
| 87 | # endif | ||
| 88 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | ||
| 89 | led_eeconfig_t led_matrix; | ||
| 90 | bool led_suspend_state; | ||
| 91 | # endif | ||
| 92 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 93 | rgb_config_t rgb_matrix; | ||
| 94 | bool rgb_suspend_state; | ||
| 95 | # endif | ||
| 96 | int8_t mouse_x; | ||
| 97 | int8_t mouse_y; | ||
| 98 | uint16_t device_cpi; | ||
| 99 | bool oled_on; | ||
| 100 | layer_state_t t_layer_state; | ||
| 101 | layer_state_t t_default_layer_state; | ||
| 102 | } __attribute__((packed)) I2C_slave_buffer_t; | ||
| 103 | |||
| 104 | static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; | ||
| 105 | |||
| 106 | # define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level) | ||
| 107 | # define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) | ||
| 108 | # define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix) | ||
| 109 | # define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix) | ||
| 110 | # define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer) | ||
| 111 | # define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods) | ||
| 112 | # define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods) | ||
| 113 | # define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods) | ||
| 114 | # define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) | ||
| 115 | # define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) | ||
| 116 | # define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x) | ||
| 117 | # define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y) | ||
| 118 | # define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi) | ||
| 119 | # define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on) | ||
| 120 | # define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state) | ||
| 121 | # define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state) | ||
| 122 | # define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix) | ||
| 123 | # define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state) | ||
| 124 | # define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix) | ||
| 125 | # define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state) | ||
| 126 | |||
| 127 | # define TIMEOUT 100 | ||
| 128 | |||
| 129 | # ifndef SLAVE_I2C_ADDRESS | ||
| 130 | # define SLAVE_I2C_ADDRESS 0x32 | ||
| 131 | # endif | ||
| 132 | |||
| 133 | // Get rows from other half over i2c | ||
| 134 | bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { | ||
| 135 | i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT); | ||
| 136 | # ifdef SPLIT_TRANSPORT_MIRROR | ||
| 137 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT); | ||
| 138 | # endif | ||
| 139 | // write backlight info | ||
| 140 | # ifdef BACKLIGHT_ENABLE | ||
| 141 | uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; | ||
| 142 | if (level != i2c_buffer->backlight_level) { | ||
| 143 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { | ||
| 144 | i2c_buffer->backlight_level = level; | ||
| 145 | } | ||
| 146 | } | ||
| 147 | # endif | ||
| 148 | |||
| 149 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 150 | if (rgblight_get_change_flags()) { | ||
| 151 | rgblight_syncinfo_t rgblight_sync; | ||
| 152 | rgblight_get_syncinfo(&rgblight_sync); | ||
| 153 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) { | ||
| 154 | rgblight_clear_change_flags(); | ||
| 155 | } | ||
| 156 | } | ||
| 157 | # endif | ||
| 158 | |||
| 159 | # ifdef ENCODER_ENABLE | ||
| 160 | i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT); | ||
| 161 | encoder_update_raw(i2c_buffer->encoder_state); | ||
| 162 | # endif | ||
| 163 | |||
| 164 | # ifdef WPM_ENABLE | ||
| 165 | uint8_t current_wpm = get_current_wpm(); | ||
| 166 | if (current_wpm != i2c_buffer->current_wpm) { | ||
| 167 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)¤t_wpm, sizeof(current_wpm), TIMEOUT) >= 0) { | ||
| 168 | i2c_buffer->current_wpm = current_wpm; | ||
| 169 | } | ||
| 170 | } | ||
| 171 | # endif | ||
| 172 | |||
| 173 | # ifdef POINTING_DEVICE_ENABLE | ||
| 174 | if (is_keyboard_left()) { | ||
| 175 | report_mouse_t temp_report = pointing_device_get_report(); | ||
| 176 | i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); | ||
| 177 | temp_report.x = i2c_buffer->mouse_x; | ||
| 178 | i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); | ||
| 179 | temp_report.y = i2c_buffer->mouse_y; | ||
| 180 | pointing_device_set_report(temp_report); | ||
| 181 | |||
| 182 | if (device_cpi != i2c_buffer->device_cpi) { | ||
| 183 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_DPI_START, (void *)&device_cpi, sizeof(device_cpi), TIMEOUT) >= 0) { | ||
| 184 | i2c_buffer->device_cpi = device_cpi | ||
| 185 | } | ||
| 186 | } | ||
| 187 | } | ||
| 188 | # endif | ||
| 189 | |||
| 190 | # ifdef SPLIT_MODS_ENABLE | ||
| 191 | uint8_t real_mods = get_mods(); | ||
| 192 | if (real_mods != i2c_buffer->real_mods) { | ||
| 193 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) { | ||
| 194 | i2c_buffer->real_mods = real_mods; | ||
| 195 | } | ||
| 196 | } | ||
| 197 | |||
| 198 | uint8_t weak_mods = get_weak_mods(); | ||
| 199 | if (weak_mods != i2c_buffer->weak_mods) { | ||
| 200 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) { | ||
| 201 | i2c_buffer->weak_mods = weak_mods; | ||
| 202 | } | ||
| 203 | } | ||
| 204 | |||
| 205 | # ifndef NO_ACTION_ONESHOT | ||
| 206 | uint8_t oneshot_mods = get_oneshot_mods(); | ||
| 207 | if (oneshot_mods != i2c_buffer->oneshot_mods) { | ||
| 208 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) { | ||
| 209 | i2c_buffer->oneshot_mods = oneshot_mods; | ||
| 210 | } | ||
| 211 | } | ||
| 212 | # endif | ||
| 213 | # endif | ||
| 214 | |||
| 215 | if (layer_state != i2c_buffer->t_layer_state) { | ||
| 216 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&layer_state, sizeof(layer_state), TIMEOUT) >= 0) { | ||
| 217 | i2c_buffer->t_layer_state = layer_state; | ||
| 218 | } | ||
| 219 | } | ||
| 220 | |||
| 221 | if (default_layer_state != i2c_buffer->t_default_layer_state) { | ||
| 222 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_DEFAULT_LAYER_STATE_START, (void *)&default_layer_state, sizeof(default_layer_state), TIMEOUT) >= 0) { | ||
| 223 | i2c_buffer->t_default_layer_state = default_layer_state; | ||
| 224 | } | ||
| 225 | } | ||
| 226 | |||
| 227 | # ifdef OLED_DRIVER_ENABLE | ||
| 228 | bool is_oled_on = is_oled_on(); | ||
| 229 | if (is_oled_on != i2c_buffer->oled_on) { | ||
| 230 | if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) { | ||
| 231 | i2c_buffer->oled_on = is_oled_on; | ||
| 232 | } | ||
| 233 | } | ||
| 234 | # endif | ||
| 235 | |||
| 236 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | ||
| 237 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT); | ||
| 238 | bool suspend_state = led_matrix_get_suspend_state(); | ||
| 239 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT); | ||
| 240 | # endif | ||
| 241 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 242 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT); | ||
| 243 | bool suspend_state = rgb_matrix_get_suspend_state(); | ||
| 244 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT); | ||
| 245 | # endif | ||
| 246 | |||
| 247 | # ifndef DISABLE_SYNC_TIMER | ||
| 248 | i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; | ||
| 249 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT); | ||
| 250 | # endif | ||
| 251 | |||
| 252 | return true; | ||
| 253 | } | ||
| 254 | |||
| 255 | void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { | ||
| 256 | # ifndef DISABLE_SYNC_TIMER | ||
| 257 | sync_timer_update(i2c_buffer->sync_timer); | ||
| 258 | # endif | ||
| 259 | // Copy matrix to I2C buffer | ||
| 260 | memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix)); | ||
| 261 | # ifdef SPLIT_TRANSPORT_MIRROR | ||
| 262 | memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix)); | ||
| 263 | # endif | ||
| 264 | |||
| 265 | // Read Backlight Info | ||
| 266 | # ifdef BACKLIGHT_ENABLE | ||
| 267 | backlight_set(i2c_buffer->backlight_level); | ||
| 268 | # endif | ||
| 269 | |||
| 270 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 271 | // Update the RGB with the new data | ||
| 272 | if (i2c_buffer->rgblight_sync.status.change_flags != 0) { | ||
| 273 | rgblight_update_sync(&i2c_buffer->rgblight_sync, false); | ||
| 274 | i2c_buffer->rgblight_sync.status.change_flags = 0; | ||
| 275 | } | ||
| 276 | # endif | ||
| 277 | |||
| 278 | # ifdef ENCODER_ENABLE | ||
| 279 | encoder_state_raw(i2c_buffer->encoder_state); | ||
| 280 | # endif | ||
| 281 | |||
| 282 | # ifdef WPM_ENABLE | ||
| 283 | set_current_wpm(i2c_buffer->current_wpm); | ||
| 284 | # endif | ||
| 285 | |||
| 286 | # ifdef POINTING_DEVICE_ENABLE | ||
| 287 | if (!is_keyboard_left()) { | ||
| 288 | static uint16_t cpi; | ||
| 289 | if (cpi != i2c_buffer->device_cpi) { | ||
| 290 | cpi = i2c_buffer->device_cpi; | ||
| 291 | pmw_set_cpi(cpi); | ||
| 292 | } | ||
| 293 | i2c_buffer->mouse_x = split_mouse_x; | ||
| 294 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); | ||
| 295 | i2c_buffer->mouse_y = split_mouse_y; | ||
| 296 | i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); | ||
| 297 | } | ||
| 298 | |||
| 299 | # endif | ||
| 300 | |||
| 301 | # ifdef SPLIT_MODS_ENABLE | ||
| 302 | set_mods(i2c_buffer->real_mods); | ||
| 303 | set_weak_mods(i2c_buffer->weak_mods); | ||
| 304 | # ifndef NO_ACTION_ONESHOT | ||
| 305 | set_oneshot_mods(i2c_buffer->oneshot_mods); | ||
| 306 | # endif | ||
| 307 | # endif | ||
| 308 | |||
| 309 | if (layer_state != i2c_buffer->t_layer_state) { | ||
| 310 | layer_state = i2c_buffer->t_layer_state; | ||
| 311 | } | ||
| 312 | if (default_layer_state != i2c_buffer->t_default_layer_state) { | ||
| 313 | default_layer_state = i2c_buffer->t_default_layer_state; | ||
| 314 | } | ||
| 315 | |||
| 316 | # ifdef OLED_DRIVER_ENABLE | ||
| 317 | if (i2c_buffer->oled_on) { | ||
| 318 | oled_on(); | ||
| 319 | } else { | ||
| 320 | oled_off(); | ||
| 321 | } | ||
| 322 | # endif | ||
| 323 | |||
| 324 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | ||
| 325 | memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix)); | ||
| 326 | led_matrix_set_suspend_state(i2c_buffer->led_suspend_state); | ||
| 327 | # endif | ||
| 328 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 329 | memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix)); | ||
| 330 | rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state); | ||
| 331 | # endif | ||
| 332 | } | ||
| 333 | |||
| 334 | void transport_master_init(void) { i2c_init(); } | ||
| 335 | |||
| 336 | void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } | ||
| 337 | |||
| 338 | #else // USE_SERIAL | ||
| 339 | |||
| 340 | # include "serial.h" | ||
| 341 | |||
| 342 | typedef struct _Serial_s2m_buffer_t { | ||
| 343 | // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack | ||
| 344 | matrix_row_t smatrix[ROWS_PER_HAND]; | ||
| 345 | # ifdef ENCODER_ENABLE | ||
| 346 | uint8_t encoder_state[NUMBER_OF_ENCODERS]; | ||
| 347 | # endif | ||
| 348 | int8_t mouse_x; | ||
| 349 | int8_t mouse_y; | ||
| 350 | } __attribute__((packed)) Serial_s2m_buffer_t; | ||
| 351 | |||
| 352 | typedef struct _Serial_m2s_buffer_t { | ||
| 353 | # ifdef SPLIT_MODS_ENABLE | ||
| 354 | uint8_t real_mods; | ||
| 355 | uint8_t weak_mods; | ||
| 356 | # ifndef NO_ACTION_ONESHOT | ||
| 357 | uint8_t oneshot_mods; | ||
| 358 | # endif | ||
| 359 | # endif | ||
| 360 | # ifndef DISABLE_SYNC_TIMER | ||
| 361 | uint32_t sync_timer; | ||
| 362 | # endif | ||
| 363 | # ifdef SPLIT_TRANSPORT_MIRROR | ||
| 364 | matrix_row_t mmatrix[ROWS_PER_HAND]; | ||
| 365 | # endif | ||
| 366 | # ifdef BACKLIGHT_ENABLE | ||
| 367 | uint8_t backlight_level; | ||
| 368 | # endif | ||
| 369 | # ifdef WPM_ENABLE | ||
| 370 | uint8_t current_wpm; | ||
| 371 | # endif | ||
| 372 | uint16_t device_cpi; | ||
| 373 | bool oled_on; | ||
| 374 | layer_state_t t_layer_state; | ||
| 375 | layer_state_t t_default_layer_state; | ||
| 376 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | ||
| 377 | led_eeconfig_t led_matrix; | ||
| 378 | bool led_suspend_state; | ||
| 379 | # endif | ||
| 380 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 381 | rgb_config_t rgb_matrix; | ||
| 382 | bool rgb_suspend_state; | ||
| 383 | # endif | ||
| 384 | } __attribute__((packed)) Serial_m2s_buffer_t; | ||
| 385 | |||
| 386 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 387 | // When MCUs on both sides drive their respective RGB LED chains, | ||
| 388 | // it is necessary to synchronize, so it is necessary to communicate RGB | ||
| 389 | // information. In that case, define RGBLIGHT_SPLIT with info on the number | ||
| 390 | // of LEDs on each half. | ||
| 391 | // | ||
| 392 | // Otherwise, if the master side MCU drives both sides RGB LED chains, | ||
| 393 | // there is no need to communicate. | ||
| 394 | |||
| 395 | typedef struct _Serial_rgblight_t { | ||
| 396 | rgblight_syncinfo_t rgblight_sync; | ||
| 397 | } Serial_rgblight_t; | ||
| 398 | |||
| 399 | volatile Serial_rgblight_t serial_rgblight = {}; | ||
| 400 | uint8_t volatile status_rgblight = 0; | ||
| 401 | # endif | ||
| 402 | |||
| 403 | volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; | ||
| 404 | volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; | ||
| 405 | uint8_t volatile status0 = 0; | ||
| 406 | |||
| 407 | enum serial_transaction_id { | ||
| 408 | GET_SLAVE_MATRIX = 0, | ||
| 409 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 410 | PUT_RGBLIGHT, | ||
| 411 | # endif | ||
| 412 | }; | ||
| 413 | |||
| 414 | SSTD_t transactions[] = { | ||
| 415 | [GET_SLAVE_MATRIX] = | ||
| 416 | { | ||
| 417 | (uint8_t *)&status0, | ||
| 418 | sizeof(serial_m2s_buffer), | ||
| 419 | (uint8_t *)&serial_m2s_buffer, | ||
| 420 | sizeof(serial_s2m_buffer), | ||
| 421 | (uint8_t *)&serial_s2m_buffer, | ||
| 422 | }, | ||
| 423 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 424 | [PUT_RGBLIGHT] = | ||
| 425 | { | ||
| 426 | (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer | ||
| 427 | }, | ||
| 428 | # endif | ||
| 429 | }; | ||
| 430 | |||
| 431 | void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } | ||
| 432 | |||
| 433 | void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } | ||
| 434 | |||
| 435 | # if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) | ||
| 436 | |||
| 437 | // rgblight synchronization information communication. | ||
| 438 | |||
| 439 | void transport_rgblight_master(void) { | ||
| 440 | if (rgblight_get_change_flags()) { | ||
| 441 | rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync); | ||
| 442 | if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) { | ||
| 443 | rgblight_clear_change_flags(); | ||
| 444 | } | ||
| 445 | } | ||
| 446 | } | ||
| 447 | |||
| 448 | void transport_rgblight_slave(void) { | ||
| 449 | if (status_rgblight == TRANSACTION_ACCEPTED) { | ||
| 450 | rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false); | ||
| 451 | status_rgblight = TRANSACTION_END; | ||
| 452 | } | ||
| 453 | } | ||
| 454 | |||
| 455 | # else | ||
| 456 | # define transport_rgblight_master() | ||
| 457 | # define transport_rgblight_slave() | ||
| 458 | # endif | ||
| 459 | |||
| 460 | bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { | ||
| 461 | # ifndef SERIAL_USE_MULTI_TRANSACTION | ||
| 462 | if (soft_serial_transaction() != TRANSACTION_END) { | ||
| 463 | return false; | ||
| 464 | } | ||
| 465 | # else | ||
| 466 | transport_rgblight_master(); | ||
| 467 | if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) { | ||
| 468 | return false; | ||
| 469 | } | ||
| 470 | # endif | ||
| 471 | |||
| 472 | // TODO: if MATRIX_COLS > 8 change to unpack() | ||
| 473 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
| 474 | slave_matrix[i] = serial_s2m_buffer.smatrix[i]; | ||
| 475 | # ifdef SPLIT_TRANSPORT_MIRROR | ||
| 476 | serial_m2s_buffer.mmatrix[i] = master_matrix[i]; | ||
| 477 | # endif | ||
| 478 | } | ||
| 479 | |||
| 480 | # ifdef BACKLIGHT_ENABLE | ||
| 481 | // Write backlight level for slave to read | ||
| 482 | serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0; | ||
| 483 | # endif | ||
| 484 | |||
| 485 | # ifdef ENCODER_ENABLE | ||
| 486 | encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state); | ||
| 487 | # endif | ||
| 488 | |||
| 489 | # ifdef WPM_ENABLE | ||
| 490 | // Write wpm to slave | ||
| 491 | serial_m2s_buffer.current_wpm = get_current_wpm(); | ||
| 492 | # endif | ||
| 493 | |||
| 494 | # ifdef SPLIT_MODS_ENABLE | ||
| 495 | serial_m2s_buffer.real_mods = get_mods(); | ||
| 496 | serial_m2s_buffer.weak_mods = get_weak_mods(); | ||
| 497 | # ifndef NO_ACTION_ONESHOT | ||
| 498 | serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); | ||
| 499 | # endif | ||
| 500 | # endif | ||
| 501 | |||
| 502 | # ifdef POINTING_DEVICE_ENABLE | ||
| 503 | if (is_keyboard_left()) { | ||
| 504 | report_mouse_t temp_report = pointing_device_get_report(); | ||
| 505 | temp_report.x = serial_s2m_buffer.mouse_x; | ||
| 506 | temp_report.y = serial_s2m_buffer.mouse_y; | ||
| 507 | pointing_device_set_report(temp_report); | ||
| 508 | serial_m2s_buffer.device_cpi = device_cpi; | ||
| 509 | } | ||
| 510 | # endif | ||
| 511 | |||
| 512 | serial_m2s_buffer.t_layer_state = layer_state; | ||
| 513 | serial_m2s_buffer.t_default_layer_state = default_layer_state; | ||
| 514 | # ifdef OLED_DRIVER_ENABLE | ||
| 515 | serial_m2s_buffer.oled_on = is_oled_on(); | ||
| 516 | # endif | ||
| 517 | |||
| 518 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | ||
| 519 | serial_m2s_buffer.led_matrix = led_matrix_eeconfig; | ||
| 520 | serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state(); | ||
| 521 | # endif | ||
| 522 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 523 | serial_m2s_buffer.rgb_matrix = rgb_matrix_config; | ||
| 524 | serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state(); | ||
| 525 | # endif | ||
| 526 | |||
| 527 | # ifndef DISABLE_SYNC_TIMER | ||
| 528 | serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; | ||
| 529 | # endif | ||
| 530 | return true; | ||
| 531 | } | ||
| 532 | |||
| 533 | void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { | ||
| 534 | transport_rgblight_slave(); | ||
| 535 | # ifndef DISABLE_SYNC_TIMER | ||
| 536 | sync_timer_update(serial_m2s_buffer.sync_timer); | ||
| 537 | # endif | ||
| 538 | |||
| 539 | // TODO: if MATRIX_COLS > 8 change to pack() | ||
| 540 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
| 541 | serial_s2m_buffer.smatrix[i] = slave_matrix[i]; | ||
| 542 | # ifdef SPLIT_TRANSPORT_MIRROR | ||
| 543 | master_matrix[i] = serial_m2s_buffer.mmatrix[i]; | ||
| 544 | # endif | ||
| 545 | } | ||
| 546 | |||
| 547 | # ifdef BACKLIGHT_ENABLE | ||
| 548 | backlight_set(serial_m2s_buffer.backlight_level); | ||
| 549 | # endif | ||
| 550 | |||
| 551 | # ifdef ENCODER_ENABLE | ||
| 552 | encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state); | ||
| 553 | # endif | ||
| 554 | |||
| 555 | # ifdef WPM_ENABLE | ||
| 556 | set_current_wpm(serial_m2s_buffer.current_wpm); | ||
| 557 | # endif | ||
| 558 | |||
| 559 | # ifdef SPLIT_MODS_ENABLE | ||
| 560 | set_mods(serial_m2s_buffer.real_mods); | ||
| 561 | set_weak_mods(serial_m2s_buffer.weak_mods); | ||
| 562 | # ifndef NO_ACTION_ONESHOT | ||
| 563 | set_oneshot_mods(serial_m2s_buffer.oneshot_mods); | ||
| 564 | # endif | ||
| 565 | # endif | ||
| 566 | |||
| 567 | # ifdef POINTING_DEVICE_ENABLE | ||
| 568 | if (!is_keyboard_left()) { | ||
| 569 | static uint16_t cpi; | ||
| 570 | if (cpi != serial_m2s_buffer.device_cpi) { | ||
| 571 | cpi = serial_m2s_buffer.device_cpi; | ||
| 572 | pmw_set_cpi(cpi); | ||
| 573 | } | ||
| 574 | serial_s2m_buffer.mouse_x = split_mouse_x; | ||
| 575 | serial_s2m_buffer.mouse_y = split_mouse_y; | ||
| 576 | } | ||
| 577 | # endif | ||
| 578 | |||
| 579 | if (layer_state != serial_m2s_buffer.t_layer_state) { | ||
| 580 | layer_state = serial_m2s_buffer.t_layer_state; | ||
| 581 | } | ||
| 582 | if (default_layer_state != serial_m2s_buffer.t_default_layer_state) { | ||
| 583 | default_layer_state = serial_m2s_buffer.t_default_layer_state; | ||
| 584 | } | ||
| 585 | # ifdef OLED_DRIVER_ENABLE | ||
| 586 | if (serial_m2s_buffer.oled_on) { | ||
| 587 | oled_on(); | ||
| 588 | } else { | ||
| 589 | oled_off(); | ||
| 590 | } | ||
| 591 | # endif | ||
| 592 | |||
| 593 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | ||
| 594 | led_matrix_eeconfig = serial_m2s_buffer.led_matrix; | ||
| 595 | led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state); | ||
| 596 | # endif | ||
| 597 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | ||
| 598 | rgb_matrix_config = serial_m2s_buffer.rgb_matrix; | ||
| 599 | rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state); | ||
| 600 | # endif | ||
| 601 | } | ||
| 602 | |||
| 603 | #endif | ||
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c index 98e467d93..debcdcfbe 100644 --- a/users/drashna/oled_stuff.c +++ b/users/drashna/oled_stuff.c | |||
| @@ -18,14 +18,14 @@ | |||
| 18 | 18 | ||
| 19 | #ifndef KEYLOGGER_LENGTH | 19 | #ifndef KEYLOGGER_LENGTH |
| 20 | // # ifdef OLED_DISPLAY_128X64 | 20 | // # ifdef OLED_DISPLAY_128X64 |
| 21 | # define KEYLOGGER_LENGTH ((int)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) | 21 | # define KEYLOGGER_LENGTH ((uint8_t)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) |
| 22 | // # else | 22 | // # else |
| 23 | // # define KEYLOGGER_LENGTH (uint8_t *(OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT)) | 23 | // # define KEYLOGGER_LENGTH (uint8_t *(OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT)) |
| 24 | // # endif | 24 | // # endif |
| 25 | #endif | 25 | #endif |
| 26 | 26 | ||
| 27 | uint32_t oled_timer = 0; | 27 | uint32_t oled_timer = 0; |
| 28 | static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; | 28 | static char keylog_str[KEYLOGGER_LENGTH + 1] = {0}; |
| 29 | static uint16_t log_timer = 0; | 29 | static uint16_t log_timer = 0; |
| 30 | 30 | ||
| 31 | // clang-format off | 31 | // clang-format off |
| @@ -57,12 +57,12 @@ void add_keylog(uint16_t keycode) { | |||
| 57 | keycode = 0; | 57 | keycode = 0; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { | 60 | for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) { |
| 61 | keylog_str[i] = keylog_str[i - 1]; | 61 | keylog_str[i - 1] = keylog_str[i]; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | if (keycode < (sizeof(code_to_name) / sizeof(char))) { | 64 | if (keycode < (sizeof(code_to_name) / sizeof(char))) { |
| 65 | keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); | 65 | keylog_str[(KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | log_timer = timer_read(); | 68 | log_timer = timer_read(); |
| @@ -70,7 +70,7 @@ void add_keylog(uint16_t keycode) { | |||
| 70 | 70 | ||
| 71 | bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) { | 71 | bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) { |
| 72 | if (record->event.pressed) { | 72 | if (record->event.pressed) { |
| 73 | #ifdef OLED_DRIVER_ENABLE | 73 | #ifdef OLED_ENABLE |
| 74 | oled_timer = timer_read32(); | 74 | oled_timer = timer_read32(); |
| 75 | add_keylog(keycode); | 75 | add_keylog(keycode); |
| 76 | #endif | 76 | #endif |
| @@ -95,27 +95,15 @@ void render_default_layer_state(void) { | |||
| 95 | case _QWERTY: | 95 | case _QWERTY: |
| 96 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); | 96 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); |
| 97 | break; | 97 | break; |
| 98 | case _COLEMAK_DH: | ||
| 99 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK_DH), false); | ||
| 100 | break; | ||
| 98 | case _COLEMAK: | 101 | case _COLEMAK: |
| 99 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); | 102 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); |
| 100 | break; | 103 | break; |
| 101 | case _DVORAK: | 104 | case _DVORAK: |
| 102 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); | 105 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); |
| 103 | break; | 106 | break; |
| 104 | case _WORKMAN: | ||
| 105 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false); | ||
| 106 | break; | ||
| 107 | case _NORMAN: | ||
| 108 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_NORMAN), false); | ||
| 109 | break; | ||
| 110 | case _MALTRON: | ||
| 111 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_MALTRON), false); | ||
| 112 | break; | ||
| 113 | case _EUCALYN: | ||
| 114 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_EUCALYN), false); | ||
| 115 | break; | ||
| 116 | case _CARPLAX: | ||
| 117 | oled_write_P(PSTR(OLED_RENDER_LAYOUT_CARPLAX), false); | ||
| 118 | break; | ||
| 119 | } | 107 | } |
| 120 | #ifdef OLED_DISPLAY_128X64 | 108 | #ifdef OLED_DISPLAY_128X64 |
| 121 | oled_advance_page(true); | 109 | oled_advance_page(true); |
| @@ -153,18 +141,16 @@ void render_keylock_status(uint8_t led_usb_state) { | |||
| 153 | oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state & (1 << USB_LED_CAPS_LOCK)); | 141 | oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state & (1 << USB_LED_CAPS_LOCK)); |
| 154 | oled_write_P(PSTR(" "), false); | 142 | oled_write_P(PSTR(" "), false); |
| 155 | oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); | 143 | oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); |
| 156 | #ifndef OLED_DISPLAY_128X64 | ||
| 157 | oled_advance_page(true); | ||
| 158 | #endif | ||
| 159 | } | 144 | } |
| 145 | |||
| 160 | void render_matrix_scan_rate(void) { | 146 | void render_matrix_scan_rate(void) { |
| 161 | #ifdef DEBUG_MATRIX_SCAN_RATE | 147 | #ifdef DEBUG_MATRIX_SCAN_RATE |
| 162 | char matrix_rate[5]; | 148 | char matrix_rate[5]; |
| 163 | uint16_t n = get_matrix_scan_rate(); | 149 | uint16_t n = get_matrix_scan_rate(); |
| 164 | matrix_rate[4] = '\0'; | 150 | matrix_rate[4] = '\0'; |
| 165 | matrix_rate[3] = '0' + n % 10; | 151 | matrix_rate[3] = '0' + n % 10; |
| 166 | matrix_rate[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | 152 | matrix_rate[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; |
| 167 | matrix_rate[1] = n / 10 ? '0' + n / 10 : ' '; | 153 | matrix_rate[1] = n / 10 ? '0' + n / 10 : ' '; |
| 168 | matrix_rate[0] = ' '; | 154 | matrix_rate[0] = ' '; |
| 169 | oled_write_P(PSTR("MS:"), false); | 155 | oled_write_P(PSTR("MS:"), false); |
| 170 | oled_write(matrix_rate, false); | 156 | oled_write(matrix_rate, false); |
| @@ -174,17 +160,21 @@ void render_matrix_scan_rate(void) { | |||
| 174 | void render_mod_status(uint8_t modifiers) { | 160 | void render_mod_status(uint8_t modifiers) { |
| 175 | static const char PROGMEM mod_status[5][3] = {{0xE8, 0xE9, 0}, {0xE4, 0xE5, 0}, {0xE6, 0xE7, 0}, {0xEA, 0xEB, 0}, {0xEC, 0xED, 0}}; | 161 | static const char PROGMEM mod_status[5][3] = {{0xE8, 0xE9, 0}, {0xE4, 0xE5, 0}, {0xE6, 0xE7, 0}, {0xEA, 0xEB, 0}, {0xEC, 0xED, 0}}; |
| 176 | oled_write_P(PSTR(OLED_RENDER_MODS_NAME), false); | 162 | oled_write_P(PSTR(OLED_RENDER_MODS_NAME), false); |
| 163 | #if defined(OLED_DISPLAY_128X64) | ||
| 164 | oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_LSHIFT))); | ||
| 165 | oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_BIT(KC_LGUI))); | ||
| 166 | oled_write_P(mod_status[2], (modifiers & MOD_BIT(KC_LALT))); | ||
| 167 | oled_write_P(mod_status[1], (modifiers & MOD_BIT(KC_LCTL))); | ||
| 168 | oled_write_P(mod_status[1], (modifiers & MOD_BIT(KC_RCTL))); | ||
| 169 | oled_write_P(mod_status[2], (modifiers & MOD_BIT(KC_RALT))); | ||
| 170 | oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_BIT(KC_RGUI))); | ||
| 171 | oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_RSHIFT))); | ||
| 172 | #else | ||
| 177 | oled_write_P(mod_status[0], (modifiers & MOD_MASK_SHIFT)); | 173 | oled_write_P(mod_status[0], (modifiers & MOD_MASK_SHIFT)); |
| 178 | oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_MASK_GUI)); | 174 | oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_MASK_GUI)); |
| 179 | #if !defined(OLED_DISPLAY_128X64) | ||
| 180 | oled_write_P(PSTR(" "), false); | 175 | oled_write_P(PSTR(" "), false); |
| 181 | #endif | ||
| 182 | oled_write_P(mod_status[2], (modifiers & MOD_MASK_ALT)); | 176 | oled_write_P(mod_status[2], (modifiers & MOD_MASK_ALT)); |
| 183 | oled_write_P(mod_status[1], (modifiers & MOD_MASK_CTRL)); | 177 | oled_write_P(mod_status[1], (modifiers & MOD_MASK_CTRL)); |
| 184 | |||
| 185 | render_matrix_scan_rate(); | ||
| 186 | #if defined(OLED_DISPLAY_128X64) | ||
| 187 | oled_advance_page(true); | ||
| 188 | #endif | 178 | #endif |
| 189 | } | 179 | } |
| 190 | 180 | ||
| @@ -284,12 +274,16 @@ void render_user_status(void) { | |||
| 284 | oled_write_P(rgb_layer_status[userspace_config.rgb_layer_change], false); | 274 | oled_write_P(rgb_layer_status[userspace_config.rgb_layer_change], false); |
| 285 | static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}}; | 275 | static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}}; |
| 286 | oled_write_P(nukem_good[0], userspace_config.nuke_switch); | 276 | oled_write_P(nukem_good[0], userspace_config.nuke_switch); |
| 277 | #if defined(UNICODE_ENABLE) | ||
| 278 | static const char PROGMEM uc_mod_status[5][3] = {{0xEA, 0xEB, 0}, {0xEC, 0xED, 0}}; | ||
| 279 | oled_write_P(uc_mod_status[get_unicode_input_mode() == UC_MAC], false); | ||
| 280 | #endif | ||
| 287 | #if defined(OLED_DISPLAY_128X64) | 281 | #if defined(OLED_DISPLAY_128X64) |
| 288 | oled_advance_page(true); | 282 | oled_advance_page(true); |
| 289 | #endif | 283 | #endif |
| 290 | } | 284 | } |
| 291 | 285 | ||
| 292 | __attribute__((weak)) void oled_driver_render_logo(void) { | 286 | void oled_driver_render_logo(void) { |
| 293 | // clang-format off | 287 | // clang-format off |
| 294 | static const char PROGMEM qmk_logo[] = { | 288 | static const char PROGMEM qmk_logo[] = { |
| 295 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | 289 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, |
| @@ -299,80 +293,101 @@ __attribute__((weak)) void oled_driver_render_logo(void) { | |||
| 299 | oled_write_P(qmk_logo, false); | 293 | oled_write_P(qmk_logo, false); |
| 300 | } | 294 | } |
| 301 | 295 | ||
| 302 | void render_wpm(void) { | 296 | void render_wpm(uint8_t padding) { |
| 303 | #ifdef WPM_ENABLE | 297 | #ifdef WPM_ENABLE |
| 304 | uint8_t n = get_current_wpm(); | 298 | uint8_t n = get_current_wpm(); |
| 305 | # ifdef OLED_DISPLAY_128X64 | 299 | char wpm_counter[4]; |
| 306 | char wpm_counter[4]; | ||
| 307 | wpm_counter[3] = '\0'; | 300 | wpm_counter[3] = '\0'; |
| 308 | wpm_counter[2] = '0' + n % 10; | 301 | wpm_counter[2] = '0' + n % 10; |
| 309 | wpm_counter[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | 302 | wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; |
| 310 | wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; | 303 | wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; |
| 311 | # else | ||
| 312 | char wpm_counter[6]; | ||
| 313 | wpm_counter[5] = '\0'; | ||
| 314 | wpm_counter[4] = '0' + n % 10; | ||
| 315 | wpm_counter[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
| 316 | wpm_counter[2] = n / 10 ? '0' + n / 10 : ' '; | ||
| 317 | wpm_counter[1] = ' '; | ||
| 318 | wpm_counter[0] = ' '; | ||
| 319 | # endif | ||
| 320 | oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false); | 304 | oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false); |
| 305 | if (padding) { | ||
| 306 | for (uint8_t n = padding; n > 0; n--) { | ||
| 307 | oled_write_P(PSTR(" "), false); | ||
| 308 | } | ||
| 309 | } | ||
| 321 | oled_write(wpm_counter, false); | 310 | oled_write(wpm_counter, false); |
| 322 | #endif | 311 | #endif |
| 323 | } | 312 | } |
| 324 | 313 | ||
| 325 | #ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball | 314 | #if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) |
| 326 | extern keyboard_config_t keyboard_config; | 315 | extern kb_config_data_t kb_config; |
| 327 | extern uint16_t dpi_array[]; | 316 | void render_pointing_dpi_status(uint8_t padding) { |
| 328 | 317 | char dpi_status[5]; | |
| 329 | void render_pointing_dpi_status(void) { | 318 | uint16_t n = kb_config.device_cpi; |
| 330 | char dpi_status[6]; | 319 | dpi_status[4] = '\0'; |
| 331 | uint16_t n = dpi_array[keyboard_config.dpi_config]; | 320 | dpi_status[3] = '0' + n % 10; |
| 332 | dpi_status[5] = '\0'; | 321 | dpi_status[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; |
| 333 | dpi_status[4] = '0' + n % 10; | 322 | dpi_status[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; |
| 334 | dpi_status[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | 323 | dpi_status[0] = n / 10 ? '0' + n / 10 : ' '; |
| 335 | dpi_status[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | 324 | oled_write_P(PSTR("DPI: "), false); |
| 336 | dpi_status[1] = n / 10 ? '0' + n / 10 : ' '; | 325 | if (padding) { |
| 337 | dpi_status[0] = ' '; | 326 | for (uint8_t n = padding; n > 0; n--) { |
| 338 | oled_write_P(PSTR(" DPI: "), false); | 327 | oled_write_P(PSTR(" "), false); |
| 328 | } | ||
| 329 | } | ||
| 339 | oled_write(dpi_status, false); | 330 | oled_write(dpi_status, false); |
| 340 | } | 331 | } |
| 341 | #endif | 332 | #endif |
| 342 | 333 | ||
| 343 | void render_status_secondary(void) { | 334 | __attribute__((weak)) void oled_driver_render_logo_right(void) { |
| 344 | #if defined(OLED_DISPLAY_128X64) | 335 | #if defined(OLED_DISPLAY_128X64) |
| 345 | oled_driver_render_logo(); | 336 | oled_driver_render_logo(); |
| 346 | #endif | ||
| 347 | /* Show Keyboard Layout */ | ||
| 348 | render_default_layer_state(); | 337 | render_default_layer_state(); |
| 349 | render_layer_state(); | 338 | oled_set_cursor(0, 4); |
| 350 | render_mod_status(get_mods() | get_oneshot_mods()); | 339 | #else |
| 351 | // render_keylogger_status(); | 340 | render_default_layer_state(); |
| 352 | render_keylock_status(host_keyboard_leds()); | 341 | #endif |
| 353 | } | 342 | } |
| 354 | 343 | ||
| 355 | void render_status_main(void) { | 344 | __attribute__((weak)) void oled_driver_render_logo_left(void) { |
| 356 | #if defined(OLED_DISPLAY_128X64) | 345 | #if defined(OLED_DISPLAY_128X64) |
| 357 | oled_driver_render_logo(); | 346 | oled_driver_render_logo(); |
| 358 | # ifdef DEBUG_MATRIX_SCAN_RATE | 347 | # ifdef DEBUG_MATRIX_SCAN_RATE |
| 359 | render_matrix_scan_rate(); | 348 | render_matrix_scan_rate(); |
| 360 | # else | 349 | # elif defined(WPM_ENABLE) |
| 361 | render_wpm(); | 350 | render_wpm(0); |
| 362 | # endif | 351 | # endif |
| 363 | # ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball | 352 | oled_write_P(PSTR(" "), false); |
| 364 | render_pointing_dpi_status(); | 353 | # if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) |
| 354 | render_pointing_dpi_status(1); | ||
| 365 | # endif | 355 | # endif |
| 366 | oled_write_P(PSTR("\n"), false); | 356 | oled_set_cursor(0, 4); |
| 367 | #else | 357 | #else |
| 368 | render_default_layer_state(); | 358 | render_default_layer_state(); |
| 369 | #endif | 359 | #endif |
| 360 | } | ||
| 361 | |||
| 362 | void render_status_secondary(void) { | ||
| 363 | oled_driver_render_logo_right(); | ||
| 364 | /* Show Keyboard Layout */ | ||
| 365 | render_layer_state(); | ||
| 366 | render_mod_status(get_mods() | get_oneshot_mods()); | ||
| 367 | #if !defined(OLED_DISPLAY_128X64) && defined(WPM_ENABLE) | ||
| 368 | render_wpm(2); | ||
| 369 | #endif | ||
| 370 | // render_keylock_status(host_keyboard_leds()); | ||
| 371 | } | ||
| 372 | |||
| 373 | void render_status_main(void) { | ||
| 374 | oled_driver_render_logo_left(); | ||
| 375 | |||
| 370 | /* Show Keyboard Layout */ | 376 | /* Show Keyboard Layout */ |
| 371 | // render_keylock_status(host_keyboard_leds()); | 377 | // render_keylock_status(host_keyboard_leds()); |
| 372 | render_bootmagic_status(); | 378 | render_bootmagic_status(); |
| 373 | render_user_status(); | 379 | render_user_status(); |
| 374 | 380 | ||
| 375 | render_keylogger_status(); | 381 | // render_keylogger_status(); |
| 382 | } | ||
| 383 | |||
| 384 | __attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; } | ||
| 385 | |||
| 386 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 387 | for (uint8_t i = 0; i < (KEYLOGGER_LENGTH - 1); i++) { | ||
| 388 | add_keylog(0); | ||
| 389 | } | ||
| 390 | return oled_init_keymap(rotation); | ||
| 376 | } | 391 | } |
| 377 | 392 | ||
| 378 | void oled_task_user(void) { | 393 | void oled_task_user(void) { |
| @@ -385,8 +400,15 @@ void oled_task_user(void) { | |||
| 385 | } else { | 400 | } else { |
| 386 | oled_on(); | 401 | oled_on(); |
| 387 | } | 402 | } |
| 403 | } | ||
| 404 | if (is_keyboard_left()) { | ||
| 388 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | 405 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) |
| 389 | } else { | 406 | } else { |
| 390 | render_status_secondary(); | 407 | render_status_secondary(); |
| 391 | } | 408 | } |
| 409 | if (is_keyboard_master()) { | ||
| 410 | render_keylogger_status(); | ||
| 411 | } else { | ||
| 412 | render_keylock_status(host_keyboard_leds()); | ||
| 413 | } | ||
| 392 | } | 414 | } |
diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h index 1f4440bd4..8795684d6 100644 --- a/users/drashna/oled_stuff.h +++ b/users/drashna/oled_stuff.h | |||
| @@ -19,97 +19,113 @@ | |||
| 19 | #include "quantum.h" | 19 | #include "quantum.h" |
| 20 | #include "oled_driver.h" | 20 | #include "oled_driver.h" |
| 21 | 21 | ||
| 22 | void oled_driver_render_logo(void); | 22 | void oled_driver_render_logo(void); |
| 23 | bool process_record_user_oled(uint16_t keycode, keyrecord_t *record); | 23 | bool process_record_user_oled(uint16_t keycode, keyrecord_t *record); |
| 24 | oled_rotation_t oled_init_keymap(oled_rotation_t rotation); | ||
| 24 | extern uint32_t oled_timer; | 25 | extern uint32_t oled_timer; |
| 26 | void render_keylogger_status(void); | ||
| 27 | void render_default_layer_state(void); | ||
| 28 | void render_layer_state(void); | ||
| 29 | void render_keylock_status(uint8_t led_usb_state); | ||
| 30 | void render_matrix_scan_rate(void); | ||
| 31 | void render_mod_status(uint8_t modifiers); | ||
| 32 | void render_bootmagic_status(void); | ||
| 33 | void render_user_status(void); | ||
| 34 | void oled_driver_render_logo(void); | ||
| 35 | void render_wpm(uint8_t padding); | ||
| 36 | void render_pointing_dpi_status(uint8_t padding); | ||
| 37 | void oled_driver_render_logo_left(void); | ||
| 38 | void oled_driver_render_logo_right(void); | ||
| 25 | 39 | ||
| 26 | #ifdef OLED_DISPLAY_128X64 | 40 | #ifdef OLED_DISPLAY_128X64 |
| 27 | # define OLED_RENDER_KEYLOGGER "Keylogger: " | 41 | # define OLED_RENDER_KEYLOGGER "Keylogger: " |
| 28 | 42 | ||
| 29 | # define OLED_RENDER_LAYOUT_NAME "Layout: " | 43 | # define OLED_RENDER_LAYOUT_NAME "Layout: " |
| 30 | # define OLED_RENDER_LAYOUT_QWERTY "Qwerty" | 44 | # define OLED_RENDER_LAYOUT_QWERTY "Qwerty" |
| 31 | # define OLED_RENDER_LAYOUT_COLEMAK "Colemak" | 45 | # define OLED_RENDER_LAYOUT_COLEMAK_DH "Colemak-DH" |
| 32 | # define OLED_RENDER_LAYOUT_DVORAK "Dvorak" | 46 | # define OLED_RENDER_LAYOUT_COLEMAK "Colemak" |
| 33 | # define OLED_RENDER_LAYOUT_WORKMAN "Workman" | 47 | # define OLED_RENDER_LAYOUT_DVORAK "Dvorak" |
| 34 | # define OLED_RENDER_LAYOUT_NORMAN "Norman" | 48 | # define OLED_RENDER_LAYOUT_WORKMAN "Workman" |
| 35 | # define OLED_RENDER_LAYOUT_MALTRON "Matron" | 49 | # define OLED_RENDER_LAYOUT_NORMAN "Norman" |
| 36 | # define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn" | 50 | # define OLED_RENDER_LAYOUT_MALTRON "Matron" |
| 37 | # define OLED_RENDER_LAYOUT_CARPLAX "Carplax" | 51 | # define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn" |
| 38 | 52 | # define OLED_RENDER_LAYOUT_CARPLAX "Carplax" | |
| 39 | # define OLED_RENDER_LAYER_NAME "Layer:" | 53 | |
| 40 | # define OLED_RENDER_LAYER_LOWER "Lower" | 54 | # define OLED_RENDER_LAYER_NAME "Layer:" |
| 41 | # define OLED_RENDER_LAYER_RAISE "Raise" | 55 | # define OLED_RENDER_LAYER_LOWER "Lower" |
| 42 | # define OLED_RENDER_LAYER_ADJUST "Adjust" | 56 | # define OLED_RENDER_LAYER_RAISE "Raise" |
| 43 | # define OLED_RENDER_LAYER_MODS "Mods" | 57 | # define OLED_RENDER_LAYER_ADJUST "Adjust" |
| 44 | 58 | # define OLED_RENDER_LAYER_MODS "Mods" | |
| 45 | # define OLED_RENDER_LOCK_NAME "Lock: " | 59 | |
| 46 | # define OLED_RENDER_LOCK_NUML "NUML" | 60 | # define OLED_RENDER_LOCK_NAME "Lock: " |
| 47 | # define OLED_RENDER_LOCK_CAPS "CAPS" | 61 | # define OLED_RENDER_LOCK_NUML "NUML" |
| 48 | # define OLED_RENDER_LOCK_SCLK "SCLK" | 62 | # define OLED_RENDER_LOCK_CAPS "CAPS" |
| 49 | 63 | # define OLED_RENDER_LOCK_SCLK "SCLK" | |
| 50 | # define OLED_RENDER_MODS_NAME "Mods:" | 64 | |
| 51 | # define OLED_RENDER_MODS_SFT "Sft" | 65 | # define OLED_RENDER_MODS_NAME "Mods:" |
| 52 | # define OLED_RENDER_MODS_CTL "Ctl" | 66 | # define OLED_RENDER_MODS_SFT "Sft" |
| 53 | # define OLED_RENDER_MODS_ALT "Alt" | 67 | # define OLED_RENDER_MODS_CTL "Ctl" |
| 54 | # define OLED_RENDER_MODS_GUI "GUI" | 68 | # define OLED_RENDER_MODS_ALT "Alt" |
| 55 | 69 | # define OLED_RENDER_MODS_GUI "GUI" | |
| 56 | # define OLED_RENDER_BOOTMAGIC_NAME "Boot " | 70 | |
| 57 | # define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" | 71 | # define OLED_RENDER_BOOTMAGIC_NAME "Boot " |
| 58 | # define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" | 72 | # define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" |
| 59 | # define OLED_RENDER_BOOTMAGIC_GRV "GRV" | 73 | # define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" |
| 74 | # define OLED_RENDER_BOOTMAGIC_GRV "GRV" | ||
| 60 | # define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" | 75 | # define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" |
| 61 | # define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" | 76 | # define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" |
| 62 | # define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" | 77 | # define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" |
| 63 | 78 | ||
| 64 | # define OLED_RENDER_USER_NAME "USER:" | 79 | # define OLED_RENDER_USER_NAME "USER:" |
| 65 | # define OLED_RENDER_USER_ANIM "Anim" | 80 | # define OLED_RENDER_USER_ANIM "Anim" |
| 66 | # define OLED_RENDER_USER_LAYR "Layr" | 81 | # define OLED_RENDER_USER_LAYR "Layr" |
| 67 | # define OLED_RENDER_USER_NUKE "Nuke" | 82 | # define OLED_RENDER_USER_NUKE "Nuke" |
| 68 | 83 | ||
| 69 | # define OLED_RENDER_WPM_COUNTER "WPM: " | 84 | # define OLED_RENDER_WPM_COUNTER "WPM: " |
| 70 | #else | 85 | #else |
| 71 | # define OLED_RENDER_KEYLOGGER "KLogr" | 86 | # define OLED_RENDER_KEYLOGGER "KLogr" |
| 72 | 87 | ||
| 73 | # define OLED_RENDER_LAYOUT_NAME "Lyout" | 88 | # define OLED_RENDER_LAYOUT_NAME "Lyout" |
| 74 | # define OLED_RENDER_LAYOUT_QWERTY " QRTY" | 89 | # define OLED_RENDER_LAYOUT_QWERTY " QRTY" |
| 75 | # define OLED_RENDER_LAYOUT_COLEMAK " COLE" | 90 | # define OLED_RENDER_LAYOUT_COLEMAK_DH " cmDH" |
| 76 | # define OLED_RENDER_LAYOUT_DVORAK " DVRK" | 91 | # define OLED_RENDER_LAYOUT_COLEMAK " COLE" |
| 77 | # define OLED_RENDER_LAYOUT_WORKMAN " WKMN" | 92 | # define OLED_RENDER_LAYOUT_DVORAK " DVRK" |
| 78 | # define OLED_RENDER_LAYOUT_NORMAN " NORM" | 93 | # define OLED_RENDER_LAYOUT_WORKMAN " WKMN" |
| 79 | # define OLED_RENDER_LAYOUT_MALTRON " MLTN" | 94 | # define OLED_RENDER_LAYOUT_NORMAN " NORM" |
| 80 | # define OLED_RENDER_LAYOUT_EUCALYN " ECLN" | 95 | # define OLED_RENDER_LAYOUT_MALTRON " MLTN" |
| 81 | # define OLED_RENDER_LAYOUT_CARPLAX " CRPX" | 96 | # define OLED_RENDER_LAYOUT_EUCALYN " ECLN" |
| 82 | 97 | # define OLED_RENDER_LAYOUT_CARPLAX " CRPX" | |
| 83 | # define OLED_RENDER_LAYER_NAME "LAYER" | 98 | |
| 84 | # define OLED_RENDER_LAYER_LOWER "Lower" | 99 | # define OLED_RENDER_LAYER_NAME "LAYER" |
| 85 | # define OLED_RENDER_LAYER_RAISE "Raise" | 100 | # define OLED_RENDER_LAYER_LOWER "Lower" |
| 86 | # define OLED_RENDER_LAYER_ADJUST "Adjst" | 101 | # define OLED_RENDER_LAYER_RAISE "Raise" |
| 87 | # define OLED_RENDER_LAYER_MODS " Mods" | 102 | # define OLED_RENDER_LAYER_ADJUST "Adjst" |
| 88 | 103 | # define OLED_RENDER_LAYER_MODS " Mods" | |
| 89 | # define OLED_RENDER_LOCK_NAME "Lock:" | 104 | |
| 90 | # define OLED_RENDER_LOCK_NUML "NumL" | 105 | # define OLED_RENDER_LOCK_NAME "Lock:" |
| 91 | # define OLED_RENDER_LOCK_CAPS "CapL" | 106 | # define OLED_RENDER_LOCK_NUML "NumL" |
| 92 | # define OLED_RENDER_LOCK_SCLK "ScrL" | 107 | # define OLED_RENDER_LOCK_CAPS "CapL" |
| 93 | 108 | # define OLED_RENDER_LOCK_SCLK "ScrL" | |
| 94 | # define OLED_RENDER_MODS_NAME "Mods: " | 109 | |
| 95 | # define OLED_RENDER_MODS_SFT "Shft" | 110 | # define OLED_RENDER_MODS_NAME "Mods: " |
| 96 | # define OLED_RENDER_MODS_CTL "Ctrl" | 111 | # define OLED_RENDER_MODS_SFT "Shft" |
| 97 | # define OLED_RENDER_MODS_ALT "Alt\n" | 112 | # define OLED_RENDER_MODS_CTL "Ctrl" |
| 98 | # define OLED_RENDER_MODS_GUI "GUI\n" | 113 | # define OLED_RENDER_MODS_ALT "Alt\n" |
| 99 | 114 | # define OLED_RENDER_MODS_GUI "GUI\n" | |
| 100 | # define OLED_RENDER_BOOTMAGIC_NAME "BTMGK" | 115 | |
| 101 | # define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" | 116 | # define OLED_RENDER_BOOTMAGIC_NAME "BTMGK" |
| 102 | # define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" | 117 | # define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" |
| 103 | # define OLED_RENDER_BOOTMAGIC_GRV "GRV" | 118 | # define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" |
| 119 | # define OLED_RENDER_BOOTMAGIC_GRV "GRV" | ||
| 104 | # define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" | 120 | # define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" |
| 105 | # define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" | 121 | # define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" |
| 106 | # define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" | 122 | # define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" |
| 107 | 123 | ||
| 108 | # define OLED_RENDER_USER_NAME "USER:" | 124 | # define OLED_RENDER_USER_NAME "USER:" |
| 109 | # define OLED_RENDER_USER_ANIM "Anim" | 125 | # define OLED_RENDER_USER_ANIM "Anim" |
| 110 | # define OLED_RENDER_USER_LAYR "Layr" | 126 | # define OLED_RENDER_USER_LAYR "Layr" |
| 111 | # define OLED_RENDER_USER_NUKE "Nuke" | 127 | # define OLED_RENDER_USER_NUKE "Nuke" |
| 112 | 128 | ||
| 113 | # define OLED_RENDER_WPM_COUNTER "WPM: " | 129 | # define OLED_RENDER_WPM_COUNTER "WPM: " |
| 114 | 130 | ||
| 115 | #endif | 131 | #endif |
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c deleted file mode 100644 index a6ca6c996..000000000 --- a/users/drashna/pimoroni_trackball.c +++ /dev/null | |||
| @@ -1,151 +0,0 @@ | |||
| 1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "pimoroni_trackball.h" | ||
| 18 | #include "i2c_master.h" | ||
| 19 | |||
| 20 | static uint8_t scrolling = 0; | ||
| 21 | static int16_t x_offset = 0; | ||
| 22 | static int16_t y_offset = 0; | ||
| 23 | static int16_t h_offset = 0; | ||
| 24 | static int16_t v_offset = 0; | ||
| 25 | static float precisionSpeed = 1; | ||
| 26 | |||
| 27 | #ifndef I2C_TIMEOUT | ||
| 28 | # define I2C_TIMEOUT 100 | ||
| 29 | #endif | ||
| 30 | #ifndef MOUSE_DEBOUNCE | ||
| 31 | # define MOUSE_DEBOUNCE 5 | ||
| 32 | #endif | ||
| 33 | |||
| 34 | void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { | ||
| 35 | uint8_t data[] = {0x00, red, green, blue, white}; | ||
| 36 | i2c_transmit(TRACKBALL_ADDRESS << 1, data, sizeof(data), I2C_TIMEOUT); | ||
| 37 | } | ||
| 38 | |||
| 39 | int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { | ||
| 40 | int16_t offset = (int16_t)positive - (int16_t)negative; | ||
| 41 | int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed); | ||
| 42 | return offset < 0 ? -magnitude : magnitude; | ||
| 43 | } | ||
| 44 | |||
| 45 | void update_member(int8_t* member, int16_t* offset) { | ||
| 46 | if (*offset > 127) { | ||
| 47 | *member = 127; | ||
| 48 | *offset -= 127; | ||
| 49 | } else if (*offset < -127) { | ||
| 50 | *member = -127; | ||
| 51 | *offset += 127; | ||
| 52 | } else { | ||
| 53 | *member = *offset; | ||
| 54 | *offset = 0; | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | __attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) { | ||
| 59 | if (pressed) { | ||
| 60 | mouse->buttons |= MOUSE_BTN1; | ||
| 61 | } else { | ||
| 62 | mouse->buttons &= ~MOUSE_BTN1; | ||
| 63 | } | ||
| 64 | } | ||
| 65 | |||
| 66 | void trackball_register_button(bool pressed, enum mouse_buttons button) { | ||
| 67 | report_mouse_t currentReport = pointing_device_get_report(); | ||
| 68 | if (pressed) { | ||
| 69 | currentReport.buttons |= button; | ||
| 70 | } else { | ||
| 71 | currentReport.buttons &= ~button; | ||
| 72 | } | ||
| 73 | pointing_device_set_report(currentReport); | ||
| 74 | } | ||
| 75 | |||
| 76 | float trackball_get_precision(void) { return precisionSpeed; } | ||
| 77 | void trackball_set_precision(float precision) { precisionSpeed = precision; } | ||
| 78 | bool trackball_is_scrolling(void) { return scrolling; } | ||
| 79 | void trackball_set_scrolling(bool scroll) { scrolling = scroll; } | ||
| 80 | |||
| 81 | bool has_report_changed (report_mouse_t first, report_mouse_t second) { | ||
| 82 | return !( | ||
| 83 | (!first.buttons && first.buttons == second.buttons) && | ||
| 84 | (!first.x && first.x == second.x) && | ||
| 85 | (!first.y && first.y == second.y) && | ||
| 86 | (!first.h && first.h == second.h) && | ||
| 87 | (!first.v && first.v == second.v) ); | ||
| 88 | } | ||
| 89 | |||
| 90 | |||
| 91 | __attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); } | ||
| 92 | |||
| 93 | void pointing_device_task(void) { | ||
| 94 | static bool debounce; | ||
| 95 | static uint16_t debounce_timer; | ||
| 96 | uint8_t state[5] = {}; | ||
| 97 | if (i2c_readReg(TRACKBALL_ADDRESS << 1, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { | ||
| 98 | if (!state[4] && !debounce) { | ||
| 99 | if (scrolling) { | ||
| 100 | #ifdef PIMORONI_TRACKBALL_INVERT_X | ||
| 101 | h_offset += mouse_offset(state[2], state[3], 1); | ||
| 102 | #else | ||
| 103 | h_offset -= mouse_offset(state[2], state[3], 1); | ||
| 104 | #endif | ||
| 105 | #ifdef PIMORONI_TRACKBALL_INVERT_Y | ||
| 106 | v_offset += mouse_offset(state[1], state[0], 1); | ||
| 107 | #else | ||
| 108 | v_offset -= mouse_offset(state[1], state[0], 1); | ||
| 109 | #endif | ||
| 110 | } else { | ||
| 111 | #ifdef PIMORONI_TRACKBALL_INVERT_X | ||
| 112 | x_offset -= mouse_offset(state[2], state[3], 5); | ||
| 113 | #else | ||
| 114 | x_offset += mouse_offset(state[2], state[3], 5); | ||
| 115 | #endif | ||
| 116 | #ifdef PIMORONI_TRACKBALL_INVERT_Y | ||
| 117 | y_offset -= mouse_offset(state[1], state[0], 5); | ||
| 118 | #else | ||
| 119 | y_offset += mouse_offset(state[1], state[0], 5); | ||
| 120 | #endif | ||
| 121 | } | ||
| 122 | } else { | ||
| 123 | if (state[4]) { | ||
| 124 | debounce = true; | ||
| 125 | debounce_timer = timer_read(); | ||
| 126 | } | ||
| 127 | } | ||
| 128 | } | ||
| 129 | |||
| 130 | if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false; | ||
| 131 | |||
| 132 | report_mouse_t mouse = pointing_device_get_report(); | ||
| 133 | |||
| 134 | trackball_check_click(state[4] & (1 << 7), &mouse); | ||
| 135 | |||
| 136 | #ifndef PIMORONI_TRACKBALL_ROTATE | ||
| 137 | update_member(&mouse.x, &x_offset); | ||
| 138 | update_member(&mouse.y, &y_offset); | ||
| 139 | update_member(&mouse.h, &h_offset); | ||
| 140 | update_member(&mouse.v, &v_offset); | ||
| 141 | #else | ||
| 142 | update_member(&mouse.x, &y_offset); | ||
| 143 | update_member(&mouse.y, &x_offset); | ||
| 144 | update_member(&mouse.h, &v_offset); | ||
| 145 | update_member(&mouse.v, &h_offset); | ||
| 146 | #endif | ||
| 147 | pointing_device_set_report(mouse); | ||
| 148 | if (has_report_changed(mouse, pointing_device_get_report())) { | ||
| 149 | pointing_device_send(); | ||
| 150 | } | ||
| 151 | } | ||
diff --git a/users/drashna/post_config.h b/users/drashna/post_config.h new file mode 100644 index 000000000..7c214b66d --- /dev/null +++ b/users/drashna/post_config.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | // because layouts seem to not be respecting config.h order atm | ||
| 20 | #ifdef RGBLIGHT_ENABLE | ||
| 21 | # undef RGBLIGHT_ANIMATIONS | ||
| 22 | # if defined(__AVR__) && (!defined(__AVR_AT90USB1286__) && !defined(RGBLIGHT_ALL_ANIMATIONS)) | ||
| 23 | # define RGBLIGHT_EFFECT_BREATHING | ||
| 24 | # define RGBLIGHT_EFFECT_SNAKE | ||
| 25 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 26 | # else | ||
| 27 | # define RGBLIGHT_EFFECT_BREATHING | ||
| 28 | # define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 29 | # define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 30 | # define RGBLIGHT_EFFECT_SNAKE | ||
| 31 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 32 | # if defined(RGBLIGHT_ALL_ANIMATIONS) | ||
| 33 | # define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 34 | # define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 35 | # define RGBLIGHT_EFFECT_RGB_TEST | ||
| 36 | # define RGBLIGHT_EFFECT_ALTERNATING | ||
| 37 | # endif | ||
| 38 | # define RGBLIGHT_EFFECT_TWINKLE | ||
| 39 | # endif | ||
| 40 | #endif | ||
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index ef901226e..900b6da15 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c | |||
| @@ -19,18 +19,17 @@ | |||
| 19 | 19 | ||
| 20 | uint16_t copy_paste_timer; | 20 | uint16_t copy_paste_timer; |
| 21 | 21 | ||
| 22 | __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 23 | |||
| 24 | __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 25 | |||
| 26 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 22 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 27 | // Then runs the _keymap's record handier if not processed here | 23 | // Then runs the _keymap's record handier if not processed here |
| 28 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 24 | |
| 25 | __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 26 | __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 27 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 29 | // If console is enabled, it will print the matrix position and status of each key pressed | 28 | // If console is enabled, it will print the matrix position and status of each key pressed |
| 30 | #ifdef KEYLOGGER_ENABLE | 29 | #ifdef KEYLOGGER_ENABLE |
| 31 | 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); | 30 | 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); |
| 32 | #endif // KEYLOGGER_ENABLE | 31 | #endif // KEYLOGGER_ENABLE |
| 33 | #ifdef OLED_DRIVER_ENABLE | 32 | #ifdef OLED_ENABLE |
| 34 | process_record_user_oled(keycode, record); | 33 | process_record_user_oled(keycode, record); |
| 35 | #endif // OLED | 34 | #endif // OLED |
| 36 | 35 | ||
| @@ -46,15 +45,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 46 | } | 45 | } |
| 47 | 46 | ||
| 48 | switch (keycode) { | 47 | switch (keycode) { |
| 49 | case KC_QWERTY ... KC_WORKMAN: | 48 | case FIRST_DEFAULT_LAYER_KEYCODE ... LAST_DEFAULT_LAYER_KEYCODE: |
| 50 | if (record->event.pressed) { | 49 | if (record->event.pressed) { |
| 51 | uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); | 50 | uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); |
| 52 | if (!mods) { | 51 | if (!mods) { |
| 53 | set_single_persistent_default_layer(keycode - KC_QWERTY); | 52 | set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE); |
| 53 | #if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) | ||
| 54 | } else if (mods & MOD_MASK_SHIFT) { | 54 | } else if (mods & MOD_MASK_SHIFT) { |
| 55 | set_single_persistent_default_layer(keycode - KC_QWERTY + 4); | 55 | set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 4); |
| 56 | # if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) | ||
| 57 | |||
| 56 | } else if (mods & MOD_MASK_CTRL) { | 58 | } else if (mods & MOD_MASK_CTRL) { |
| 57 | set_single_persistent_default_layer(keycode - KC_QWERTY + 8); | 59 | set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 8); |
| 60 | # endif | ||
| 61 | #endif | ||
| 58 | } | 62 | } |
| 59 | } | 63 | } |
| 60 | break; | 64 | break; |
| @@ -79,15 +83,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 79 | #endif | 83 | #endif |
| 80 | } | 84 | } |
| 81 | send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); | 85 | send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); |
| 82 | #ifdef RGB_MATRIX_SPLIT_RIGHT | 86 | #ifdef CONVERT_TO_PROTON_C |
| 83 | send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); | 87 | send_string_with_delay_P(PSTR(" -e CTPC=yes"), TAP_CODE_DELAY); |
| 84 | # ifndef OLED_DRIVER_ENABLE | ||
| 85 | send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); | ||
| 86 | # endif | ||
| 87 | #endif | 88 | #endif |
| 88 | send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); | 89 | send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); |
| 89 | } | 90 | } |
| 90 | |||
| 91 | break; | 91 | break; |
| 92 | 92 | ||
| 93 | case VRSN: // Prints firmware version | 93 | case VRSN: // Prints firmware version |
| @@ -202,3 +202,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 202 | } | 202 | } |
| 203 | return true; | 203 | return true; |
| 204 | } | 204 | } |
| 205 | |||
| 206 | __attribute__((weak)) void post_process_record_keymap(uint16_t keycode, keyrecord_t *record) {} | ||
| 207 | void post_process_record_user(uint16_t keycode, keyrecord_t *record) { post_process_record_keymap(keycode, record); } | ||
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index f60e6d7eb..231480ac5 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h | |||
| @@ -17,58 +17,78 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | #include "drashna.h" | 18 | #include "drashna.h" |
| 19 | 19 | ||
| 20 | #if defined(KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball) | 20 | #if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) |
| 21 | # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE | 21 | # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE |
| 22 | #else | 22 | #else |
| 23 | # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE | 23 | # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE |
| 24 | #endif | 24 | #endif |
| 25 | 25 | ||
| 26 | enum userspace_custom_keycodes { | 26 | enum userspace_custom_keycodes { |
| 27 | VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info | 27 | VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info |
| 28 | KC_QWERTY, // Sets default layer to QWERTY | 28 | KC_QWERTY, // Sets default layer to QWERTY |
| 29 | KC_COLEMAK, // Sets default layer to COLEMAK | 29 | FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY |
| 30 | KC_DVORAK, // Sets default layer to DVORAK | 30 | KC_COLEMAK_DH, // Sets default layer to COLEMAK |
| 31 | KC_WORKMAN, // Sets default layer to WORKMAN | 31 | KC_COLEMAK, // Sets default layer to COLEMAK |
| 32 | KC_DIABLO_CLEAR, // Clears all Diablo Timers | 32 | KC_DVORAK, // Sets default layer to DVORAK |
| 33 | KC_MAKE, // Run keyboard's customized make command | 33 | LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN |
| 34 | KC_RGB_T, // Toggles RGB Layer Indication mode | 34 | KC_DIABLO_CLEAR, // Clears all Diablo Timers |
| 35 | RGB_IDL, // RGB Idling animations | 35 | KC_MAKE, // Run keyboard's customized make command |
| 36 | KC_SECRET_1, // test1 | 36 | KC_RGB_T, // Toggles RGB Layer Indication mode |
| 37 | KC_SECRET_2, // test2 | 37 | RGB_IDL, // RGB Idling animations |
| 38 | KC_SECRET_3, // test3 | 38 | KC_SECRET_1, // test1 |
| 39 | KC_SECRET_4, // test4 | 39 | KC_SECRET_2, // test2 |
| 40 | KC_SECRET_5, // test5 | 40 | KC_SECRET_3, // test3 |
| 41 | KC_CCCV, // Hold to copy, tap to paste | 41 | KC_SECRET_4, // test4 |
| 42 | KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! | 42 | KC_SECRET_5, // test5 |
| 43 | UC_FLIP, // (ಠ痊ಠ)┻━┻ | 43 | KC_CCCV, // Hold to copy, tap to paste |
| 44 | UC_TABL, // ┬─┬ノ( º _ ºノ) | 44 | KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! |
| 45 | UC_SHRG, // ¯\_(ツ)_/¯ | 45 | UC_FLIP, // (ಠ痊ಠ)┻━┻ |
| 46 | UC_DISA, // ಠ_ಠ | 46 | UC_TABL, // ┬─┬ノ( º _ ºノ) |
| 47 | NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes | 47 | UC_SHRG, // ¯\_(ツ)_/¯ |
| 48 | UC_DISA, // ಠ_ಠ | ||
| 49 | NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes | ||
| 48 | }; | 50 | }; |
| 49 | 51 | ||
| 50 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record); | 52 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record); |
| 51 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | 53 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); |
| 54 | void post_process_record_keymap(uint16_t keycode, keyrecord_t *record); | ||
| 52 | 55 | ||
| 53 | #define LOWER MO(_LOWER) | 56 | #define LOWER MO(_LOWER) |
| 54 | #define RAISE MO(_RAISE) | 57 | #define RAISE MO(_RAISE) |
| 55 | #define ADJUST MO(_ADJUST) | 58 | #define ADJUST MO(_ADJUST) |
| 56 | #define TG_MODS OS_TOGG | 59 | #define TG_MODS OS_TOGG |
| 57 | #define TG_GAME TG(_GAMEPAD) | 60 | #define TG_GAME TG(_GAMEPAD) |
| 58 | #define TG_DBLO TG(_DIABLO) | 61 | #define TG_DBLO TG(_DIABLO) |
| 59 | #define OS_LWR OSL(_LOWER) | 62 | #define OS_LWR OSL(_LOWER) |
| 60 | #define OS_RSE OSL(_RAISE) | 63 | #define OS_RSE OSL(_RAISE) |
| 61 | 64 | ||
| 62 | #define KC_SEC1 KC_SECRET_1 | 65 | #define KC_SEC1 KC_SECRET_1 |
| 63 | #define KC_SEC2 KC_SECRET_2 | 66 | #define KC_SEC2 KC_SECRET_2 |
| 64 | #define KC_SEC3 KC_SECRET_3 | 67 | #define KC_SEC3 KC_SECRET_3 |
| 65 | #define KC_SEC4 KC_SECRET_4 | 68 | #define KC_SEC4 KC_SECRET_4 |
| 66 | #define KC_SEC5 KC_SECRET_5 | 69 | #define KC_SEC5 KC_SECRET_5 |
| 67 | 70 | ||
| 68 | #define QWERTY KC_QWERTY | 71 | #define QWERTY KC_QWERTY |
| 69 | #define DVORAK KC_DVORAK | 72 | #define DVORAK KC_DVORAK |
| 70 | #define COLEMAK KC_COLEMAK | 73 | #define COLEMAK KC_COLEMAK |
| 71 | #define WORKMAN KC_WORKMAN | 74 | #define COLEMAKDH KC_COLEMAK_DH |
| 75 | |||
| 76 | #define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE | ||
| 77 | #define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1) | ||
| 78 | #define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2) | ||
| 79 | #define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3) | ||
| 80 | #if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) | ||
| 81 | # define DEFLYR5 (FIRST_DEFAULT_LAYER_KEYCODE + 4) | ||
| 82 | # define DEFLYR6 (FIRST_DEFAULT_LAYER_KEYCODE + 5) | ||
| 83 | # define DEFLYR7 (FIRST_DEFAULT_LAYER_KEYCODE + 6) | ||
| 84 | # define DEFLYR8 (FIRST_DEFAULT_LAYER_KEYCODE + 7) | ||
| 85 | # if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) | ||
| 86 | # define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8) | ||
| 87 | # define DEFLYR10 (FIRST_DEFAULT_LAYER_KEYCODE + 9) | ||
| 88 | # define DEFLYR11 (FIRST_DEFAULT_LAYER_KEYCODE + 10) | ||
| 89 | # define DEFLYR12 (FIRST_DEFAULT_LAYER_KEYCODE + 11) | ||
| 90 | # endif | ||
| 91 | #endif | ||
| 72 | 92 | ||
| 73 | #define KC_RESET RESET | 93 | #define KC_RESET RESET |
| 74 | #define KC_RST KC_RESET | 94 | #define KC_RST KC_RESET |
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c index 9e9e1e427..97811092c 100644 --- a/users/drashna/rgb_matrix_stuff.c +++ b/users/drashna/rgb_matrix_stuff.c | |||
| @@ -20,11 +20,6 @@ | |||
| 20 | extern led_config_t g_led_config; | 20 | extern led_config_t g_led_config; |
| 21 | 21 | ||
| 22 | static uint32_t hypno_timer; | 22 | static uint32_t hypno_timer; |
| 23 | #if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) | ||
| 24 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
| 25 | #else | ||
| 26 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN | ||
| 27 | #endif | ||
| 28 | 23 | ||
| 29 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max) { | 24 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max) { |
| 30 | HSV hsv = {hue, sat, val}; | 25 | HSV hsv = {hue, sat, val}; |
| @@ -34,27 +29,27 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode | |||
| 34 | 29 | ||
| 35 | switch (mode) { | 30 | switch (mode) { |
| 36 | case 1: // breathing | 31 | case 1: // breathing |
| 37 | { | 32 | { |
| 38 | uint16_t time = scale16by8(g_rgb_timer, speed / 8); | 33 | uint16_t time = scale16by8(g_rgb_timer, speed / 8); |
| 39 | hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); | 34 | hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); |
| 40 | RGB rgb = hsv_to_rgb(hsv); | 35 | RGB rgb = hsv_to_rgb(hsv); |
| 41 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | 36 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 42 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | 37 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { |
| 43 | RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); | 38 | RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); |
| 39 | } | ||
| 44 | } | 40 | } |
| 41 | break; | ||
| 45 | } | 42 | } |
| 46 | break; | ||
| 47 | } | ||
| 48 | default: // Solid Color | 43 | default: // Solid Color |
| 49 | { | 44 | { |
| 50 | RGB rgb = hsv_to_rgb(hsv); | 45 | RGB rgb = hsv_to_rgb(hsv); |
| 51 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | 46 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 52 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | 47 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { |
| 53 | RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); | 48 | RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); |
| 49 | } | ||
| 54 | } | 50 | } |
| 51 | break; | ||
| 55 | } | 52 | } |
| 56 | break; | ||
| 57 | } | ||
| 58 | } | 53 | } |
| 59 | } | 54 | } |
| 60 | 55 | ||
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 6723ad4bf..15108bde0 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -23,106 +23,19 @@ | |||
| 23 | bool has_initialized; | 23 | bool has_initialized; |
| 24 | 24 | ||
| 25 | void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), index); } | 25 | void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), index); } |
| 26 | 26 | void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { | |
| 27 | # ifdef RGBLIGHT_TWINKLE | 27 | rgblight_sethsv_noeeprom(hue, sat, val); |
| 28 | static rgblight_fadeout lights[RGBLED_NUM]; | 28 | // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly |
| 29 | 29 | rgblight_mode_noeeprom(mode); | |
| 30 | /* Handler for fading/twinkling effect */ | ||
| 31 | void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive | ||
| 32 | bool litup = false; | ||
| 33 | |||
| 34 | for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { | ||
| 35 | if (lights[light_index].enabled && sync_timer_elapsed(lights[light_index].timer) > 10) { | ||
| 36 | rgblight_fadeout *light = &lights[light_index]; | ||
| 37 | litup = true; | ||
| 38 | |||
| 39 | if (light->life) { | ||
| 40 | light->life -= 1; | ||
| 41 | if (get_highest_layer(layer_state) == 0) { | ||
| 42 | sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); | ||
| 43 | } | ||
| 44 | light->timer = sync_timer_read(); | ||
| 45 | } else { | ||
| 46 | if (light->enabled && get_highest_layer(layer_state) == 0) { | ||
| 47 | rgblight_sethsv_default_helper(light_index); | ||
| 48 | } | ||
| 49 | litup = light->enabled = false; | ||
| 50 | } | ||
| 51 | } | ||
| 52 | } | ||
| 53 | if (litup && get_highest_layer(layer_state) == 0) { | ||
| 54 | rgblight_set(); | ||
| 55 | } | ||
| 56 | } | 30 | } |
| 57 | 31 | ||
| 58 | /* Triggers a LED to fade/twinkle. | 32 | bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { return true; } |
| 59 | * This function handles the selection of the LED and prepres for it to be used. | ||
| 60 | */ | ||
| 61 | void start_rgb_light(void) { | ||
| 62 | uint8_t indices[RGBLED_NUM]; | ||
| 63 | uint8_t indices_count = 0; | ||
| 64 | uint8_t min_life = 0xFF; | ||
| 65 | uint8_t min_life_index = -1; | ||
| 66 | |||
| 67 | for (uint8_t index = 0; index < RGBLED_NUM; ++index) { | ||
| 68 | if (lights[index].enabled) { | ||
| 69 | if (min_life_index == -1 || lights[index].life < min_life) { | ||
| 70 | min_life = lights[index].life; | ||
| 71 | min_life_index = index; | ||
| 72 | } | ||
| 73 | continue; | ||
| 74 | } | ||
| 75 | |||
| 76 | indices[indices_count] = index; | ||
| 77 | ++indices_count; | ||
| 78 | } | ||
| 79 | |||
| 80 | uint8_t light_index; | ||
| 81 | if (!indices_count) { | ||
| 82 | light_index = min_life_index; | ||
| 83 | } else { | ||
| 84 | light_index = indices[rand() % indices_count]; | ||
| 85 | } | ||
| 86 | |||
| 87 | rgblight_fadeout *light = &lights[light_index]; | ||
| 88 | light->enabled = true; | ||
| 89 | light->timer = sync_timer_read(); | ||
| 90 | light->life = 0xC0 + rand() % 0x40; | ||
| 91 | |||
| 92 | light->hue = rgblight_get_hue() + (rand() % 0xB4) - 0x54; | ||
| 93 | |||
| 94 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); | ||
| 95 | } | ||
| 96 | # endif | ||
| 97 | |||
| 98 | bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { | ||
| 99 | uint16_t temp_keycode = keycode; | ||
| 100 | // Filter out the actual keycode from MT and LT keys. | ||
| 101 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { | ||
| 102 | temp_keycode &= 0xFF; | ||
| 103 | } | ||
| 104 | |||
| 105 | switch (temp_keycode) { | ||
| 106 | # ifdef RGBLIGHT_TWINKLE | ||
| 107 | case KC_A ... KC_SLASH: | ||
| 108 | case KC_F1 ... KC_F12: | ||
| 109 | case KC_INSERT ... KC_UP: | ||
| 110 | case KC_KP_SLASH ... KC_KP_DOT: | ||
| 111 | case KC_F13 ... KC_F24: | ||
| 112 | case KC_AUDIO_MUTE ... KC_MEDIA_REWIND: | ||
| 113 | if (record->event.pressed) { | ||
| 114 | start_rgb_light(); | ||
| 115 | } | ||
| 116 | break; | ||
| 117 | # endif // RGBLIGHT_TWINKLE | ||
| 118 | } | ||
| 119 | return true; | ||
| 120 | } | ||
| 121 | 33 | ||
| 122 | # if defined(RGBLIGHT_STARTUP_ANIMATION) | 34 | # if defined(RGBLIGHT_STARTUP_ANIMATION) |
| 123 | static bool is_enabled; | 35 | static bool is_enabled; |
| 124 | static bool is_rgblight_startup; | 36 | static bool is_rgblight_startup; |
| 125 | static uint8_t old_hue; | 37 | static HSV old_hsv; |
| 38 | static uint8_t old_mode; | ||
| 126 | static uint16_t rgblight_startup_loop_timer; | 39 | static uint16_t rgblight_startup_loop_timer; |
| 127 | # endif | 40 | # endif |
| 128 | 41 | ||
| @@ -130,37 +43,35 @@ void keyboard_post_init_rgb_light(void) { | |||
| 130 | # if defined(RGBLIGHT_STARTUP_ANIMATION) | 43 | # if defined(RGBLIGHT_STARTUP_ANIMATION) |
| 131 | is_enabled = rgblight_is_enabled(); | 44 | is_enabled = rgblight_is_enabled(); |
| 132 | if (userspace_config.rgb_layer_change) { | 45 | if (userspace_config.rgb_layer_change) { |
| 133 | rgblight_enable_noeeprom(); | ||
| 134 | } | ||
| 135 | if (rgblight_is_enabled()) { | ||
| 136 | layer_state_set_rgb_light(layer_state); | 46 | layer_state_set_rgb_light(layer_state); |
| 137 | old_hue = rgblight_get_hue(); | ||
| 138 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 139 | is_rgblight_startup = true; | ||
| 140 | } | 47 | } |
| 48 | old_hsv = rgblight_get_hsv(); | ||
| 49 | old_mode = rgblight_get_mode(); | ||
| 50 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 51 | is_rgblight_startup = true; | ||
| 141 | # endif | 52 | # endif |
| 142 | layer_state_set_rgb_light(layer_state); | 53 | if (userspace_config.rgb_layer_change) { |
| 54 | layer_state_set_rgb_light(layer_state); | ||
| 55 | } | ||
| 143 | } | 56 | } |
| 144 | 57 | ||
| 145 | void matrix_scan_rgb_light(void) { | 58 | void matrix_scan_rgb_light(void) { |
| 146 | # ifdef RGBLIGHT_TWINKLE | ||
| 147 | scan_rgblight_fadeout(); | ||
| 148 | # endif // RGBLIGHT_ENABLE | ||
| 149 | |||
| 150 | # if defined(RGBLIGHT_STARTUP_ANIMATION) | 59 | # if defined(RGBLIGHT_STARTUP_ANIMATION) |
| 151 | if (is_rgblight_startup && is_keyboard_master()) { | 60 | if (is_rgblight_startup && is_keyboard_master()) { |
| 152 | if (sync_timer_elapsed(rgblight_startup_loop_timer) > 10) { | 61 | if (sync_timer_elapsed(rgblight_startup_loop_timer) > 10) { |
| 153 | static uint8_t counter; | 62 | static uint8_t counter; |
| 154 | counter++; | 63 | counter++; |
| 155 | rgblight_sethsv_noeeprom((counter + old_hue) % 255, 255, 255); | 64 | rgblight_sethsv_noeeprom((counter + old_hsv.h) % 255, 255, 255); |
| 156 | rgblight_startup_loop_timer = sync_timer_read(); | 65 | rgblight_startup_loop_timer = sync_timer_read(); |
| 157 | if (counter == 255) { | 66 | if (counter == 255) { |
| 158 | is_rgblight_startup = false; | 67 | is_rgblight_startup = false; |
| 159 | if (!is_enabled) { | ||
| 160 | rgblight_disable_noeeprom(); | ||
| 161 | } | ||
| 162 | if (userspace_config.rgb_layer_change) { | 68 | if (userspace_config.rgb_layer_change) { |
| 163 | layer_state_set_rgb_light(layer_state); | 69 | layer_state_set_rgb_light(layer_state); |
| 70 | } else { | ||
| 71 | rgblight_set_hsv_and_mode(old_hsv.h, old_hsv.s, old_hsv.v, old_mode); | ||
| 72 | } | ||
| 73 | if (!is_enabled) { | ||
| 74 | rgblight_disable_noeeprom(); | ||
| 164 | } | 75 | } |
| 165 | } | 76 | } |
| 166 | } | 77 | } |
| @@ -168,19 +79,17 @@ void matrix_scan_rgb_light(void) { | |||
| 168 | # endif | 79 | # endif |
| 169 | } | 80 | } |
| 170 | 81 | ||
| 171 | void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { | ||
| 172 | rgblight_sethsv_noeeprom(hue, sat, val); | ||
| 173 | // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly | ||
| 174 | rgblight_mode_noeeprom(mode); | ||
| 175 | } | ||
| 176 | |||
| 177 | layer_state_t layer_state_set_rgb_light(layer_state_t state) { | 82 | layer_state_t layer_state_set_rgb_light(layer_state_t state) { |
| 178 | # ifdef RGBLIGHT_ENABLE | 83 | # ifdef RGBLIGHT_ENABLE |
| 179 | if (userspace_config.rgb_layer_change) { | 84 | if (userspace_config.rgb_layer_change) { |
| 180 | switch (get_highest_layer(state | default_layer_state)) { | 85 | switch (get_highest_layer(state | default_layer_state)) { |
| 181 | case _MACROS: // mouse | 86 | case _MOUSE: // mouse |
| 182 | if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) { | 87 | if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) { |
| 88 | # if defined(RGBLIGHT_EFFECT_TWINKLE) | ||
| 89 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_TWINKLE + 5); | ||
| 90 | # else | ||
| 183 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3); | 91 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3); |
| 92 | # endif | ||
| 184 | } | 93 | } |
| 185 | break; | 94 | break; |
| 186 | case _MEDIA: | 95 | case _MEDIA: |
| @@ -201,29 +110,17 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) { | |||
| 201 | case _ADJUST: | 110 | case _ADJUST: |
| 202 | rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); | 111 | rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); |
| 203 | break; | 112 | break; |
| 204 | case _COLEMAK: | 113 | case _DEFAULT_LAYER_1: |
| 205 | rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT); | 114 | rgblight_set_hsv_and_mode(DEFAULT_LAYER_1_HSV, RGBLIGHT_MODE_STATIC_LIGHT); |
| 206 | break; | ||
| 207 | case _DVORAK: | ||
| 208 | rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 209 | break; | ||
| 210 | case _WORKMAN: | ||
| 211 | rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 212 | break; | ||
| 213 | case _NORMAN: | ||
| 214 | rgblight_set_hsv_and_mode(HSV_CORAL, RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 215 | break; | ||
| 216 | case _MALTRON: | ||
| 217 | rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 218 | break; | 115 | break; |
| 219 | case _EUCALYN: | 116 | case _DEFAULT_LAYER_2: |
| 220 | rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_STATIC_LIGHT); | 117 | rgblight_set_hsv_and_mode(DEFAULT_LAYER_2_HSV, RGBLIGHT_MODE_STATIC_LIGHT); |
| 221 | break; | 118 | break; |
| 222 | case _CARPLAX: | 119 | case _DEFAULT_LAYER_3: |
| 223 | rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_STATIC_LIGHT); | 120 | rgblight_set_hsv_and_mode(DEFAULT_LAYER_3_HSV, RGBLIGHT_MODE_STATIC_LIGHT); |
| 224 | break; | 121 | break; |
| 225 | default: | 122 | case _DEFAULT_LAYER_4: |
| 226 | rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT); | 123 | rgblight_set_hsv_and_mode(DEFAULT_LAYER_4_HSV, RGBLIGHT_MODE_STATIC_LIGHT); |
| 227 | break; | 124 | break; |
| 228 | } | 125 | } |
| 229 | } | 126 | } |
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 0153adb54..af1acdde7 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -17,22 +17,9 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | #include "quantum.h" | 18 | #include "quantum.h" |
| 19 | 19 | ||
| 20 | #if defined(RGBLIGHT_TWINKLE) | ||
| 21 | typedef struct { | ||
| 22 | bool enabled; | ||
| 23 | uint8_t hue; | ||
| 24 | uint16_t timer; | ||
| 25 | uint8_t life; | ||
| 26 | } rgblight_fadeout; | ||
| 27 | #endif | ||
| 28 | |||
| 29 | bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record); | 20 | bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record); |
| 30 | void keyboard_post_init_rgb_light(void); | 21 | void keyboard_post_init_rgb_light(void); |
| 31 | void matrix_scan_rgb_light(void); | 22 | void matrix_scan_rgb_light(void); |
| 32 | layer_state_t layer_state_set_rgb_light(layer_state_t state); | 23 | layer_state_t layer_state_set_rgb_light(layer_state_t state); |
| 33 | layer_state_t default_layer_state_set_rgb_light(layer_state_t state); | 24 | layer_state_t default_layer_state_set_rgb_light(layer_state_t state); |
| 34 | void rgblight_sethsv_default_helper(uint8_t index); | 25 | void rgblight_sethsv_default_helper(uint8_t index); |
| 35 | |||
| 36 | #if defined(RGBLIGHT_TWINKLE) | ||
| 37 | void scan_rgblight_fadeout(void); | ||
| 38 | #endif | ||
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index b79051508..dbacae1d5 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk | |||
| @@ -2,7 +2,9 @@ SRC += drashna.c \ | |||
| 2 | process_records.c | 2 | process_records.c |
| 3 | 3 | ||
| 4 | ifneq ($(PLATFORM),CHIBIOS) | 4 | ifneq ($(PLATFORM),CHIBIOS) |
| 5 | LTO_ENABLE = yes | 5 | ifneq ($(strip $(LTO_SUPPORTED)), no) |
| 6 | LTO_ENABLE = yes | ||
| 7 | endif | ||
| 6 | endif | 8 | endif |
| 7 | SPACE_CADET_ENABLE = no | 9 | SPACE_CADET_ENABLE = no |
| 8 | GRAVE_ESC_ENABLE = no | 10 | GRAVE_ESC_ENABLE = no |
| @@ -27,9 +29,6 @@ CUSTOM_RGBLIGHT ?= yes | |||
| 27 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | 29 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) |
| 28 | ifeq ($(strip $(CUSTOM_RGBLIGHT)), yes) | 30 | ifeq ($(strip $(CUSTOM_RGBLIGHT)), yes) |
| 29 | SRC += rgb_stuff.c | 31 | SRC += rgb_stuff.c |
| 30 | ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) | ||
| 31 | OPT_DEFS += -DRGBLIGHT_TWINKLE | ||
| 32 | endif | ||
| 33 | ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) | 32 | ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) |
| 34 | OPT_DEFS += -DRGBLIGHT_NOEEPROM | 33 | OPT_DEFS += -DRGBLIGHT_NOEEPROM |
| 35 | endif | 34 | endif |
| @@ -65,42 +64,25 @@ ifeq ($(strip $(PROTOCOL)), VUSB) | |||
| 65 | endif | 64 | endif |
| 66 | 65 | ||
| 67 | CUSTOM_OLED_DRIVER ?= yes | 66 | CUSTOM_OLED_DRIVER ?= yes |
| 68 | ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) | 67 | ifeq ($(strip $(OLED_ENABLE)), yes) |
| 69 | ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) | 68 | ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) |
| 70 | SRC += oled_stuff.c | 69 | SRC += oled_stuff.c |
| 70 | OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE | ||
| 71 | endif | 71 | endif |
| 72 | endif | 72 | endif |
| 73 | 73 | ||
| 74 | ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) | 74 | ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) |
| 75 | POINTING_DEVICE_ENABLE := yes | 75 | POINTING_DEVICE_ENABLE := yes |
| 76 | OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE | 76 | OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE |
| 77 | SRC += pimoroni_trackball.c | 77 | SRC += drivers/sensors/pimoroni_trackball.c |
| 78 | QUANTUM_LIB_SRC += i2c_master.c | 78 | QUANTUM_LIB_SRC += i2c_master.c |
| 79 | endif | 79 | endif |
| 80 | 80 | ||
| 81 | CUSTOM_SPLIT_TRANSPORT ?= yes | 81 | CUSTOM_SPLIT_TRANSPORT_SYNC ?= yes |
| 82 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) | 82 | ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT_SYNC)), yes) |
| 83 | ifneq ($(strip $(SPLIT_TRANSPORT)), custom) | 83 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) |
| 84 | ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes) | 84 | QUANTUM_LIB_SRC += transport_sync.c |
| 85 | SPLIT_TRANSPORT = custom | 85 | OPT_DEFS += -DCUSTOM_SPLIT_TRANSPORT_SYNC |
| 86 | QUANTUM_LIB_SRC += drashna_transport.c | ||
| 87 | OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT | ||
| 88 | # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. | ||
| 89 | ifeq ($(PLATFORM),AVR) | ||
| 90 | ifneq ($(NO_I2C),yes) | ||
| 91 | QUANTUM_LIB_SRC += i2c_master.c \ | ||
| 92 | i2c_slave.c | ||
| 93 | endif | ||
| 94 | endif | ||
| 95 | |||
| 96 | SERIAL_DRIVER ?= bitbang | ||
| 97 | OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]')) | ||
| 98 | ifeq ($(strip $(SERIAL_DRIVER)), bitbang) | ||
| 99 | QUANTUM_LIB_SRC += serial.c | ||
| 100 | else | ||
| 101 | QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c | ||
| 102 | endif | ||
| 103 | endif | ||
| 104 | endif | 86 | endif |
| 105 | endif | 87 | endif |
| 106 | 88 | ||
diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h index 7f73f2803..81e462ce2 100644 --- a/users/drashna/tap_dances.h +++ b/users/drashna/tap_dances.h | |||
| @@ -35,12 +35,10 @@ extern diablo_timer_t diablo_timer[]; | |||
| 35 | void run_diablo_macro_check(void); | 35 | void run_diablo_macro_check(void); |
| 36 | 36 | ||
| 37 | #ifdef TAP_DANCE_ENABLE | 37 | #ifdef TAP_DANCE_ENABLE |
| 38 | // clang-format off | ||
| 39 | enum { | 38 | enum { |
| 40 | TD_D3_1 = 0, | 39 | TD_D3_1 = 0, |
| 41 | TD_D3_2, | 40 | TD_D3_2, |
| 42 | TD_D3_3, | 41 | TD_D3_3, |
| 43 | TD_D3_4 | 42 | TD_D3_4, |
| 44 | }; | 43 | }; |
| 45 | // clang-format on | ||
| 46 | #endif // TAP_DANCE_ENABLE | 44 | #endif // TAP_DANCE_ENABLE |
diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c new file mode 100644 index 000000000..fdd596c04 --- /dev/null +++ b/users/drashna/transport_sync.c | |||
| @@ -0,0 +1,192 @@ | |||
| 1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "transport_sync.h" | ||
| 18 | #include "transactions.h" | ||
| 19 | #include <string.h> | ||
| 20 | |||
| 21 | #ifdef UNICODE_ENABLE | ||
| 22 | extern unicode_config_t unicode_config; | ||
| 23 | #endif | ||
| 24 | #ifdef AUDIO_ENABLE | ||
| 25 | # include "audio.h" | ||
| 26 | extern bool delayed_tasks_run; | ||
| 27 | #endif | ||
| 28 | #if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) | ||
| 29 | extern bool tap_toggling; | ||
| 30 | #endif | ||
| 31 | #ifdef SWAP_HANDS_ENABLE | ||
| 32 | extern bool swap_hands; | ||
| 33 | #endif | ||
| 34 | extern userspace_config_t userspace_config; | ||
| 35 | |||
| 36 | __attribute__((aligned(8))) typedef struct { | ||
| 37 | bool audio_enable; | ||
| 38 | bool audio_clicky_enable; | ||
| 39 | bool tap_toggling; | ||
| 40 | bool unicode_mode; | ||
| 41 | bool swap_hands; | ||
| 42 | } user_runtime_config_t; | ||
| 43 | |||
| 44 | uint16_t transport_keymap_config = 0; | ||
| 45 | uint32_t transport_userspace_config = 0; | ||
| 46 | |||
| 47 | user_runtime_config_t user_state; | ||
| 48 | |||
| 49 | void user_state_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { | ||
| 50 | if (initiator2target_buffer_size == sizeof(user_state)) { | ||
| 51 | memcpy(&user_state, initiator2target_buffer, initiator2target_buffer_size); | ||
| 52 | } | ||
| 53 | } | ||
| 54 | void user_keymap_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { | ||
| 55 | if (initiator2target_buffer_size == sizeof(transport_keymap_config)) { | ||
| 56 | memcpy(&transport_keymap_config, initiator2target_buffer, initiator2target_buffer_size); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | void user_config_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { | ||
| 60 | if (initiator2target_buffer_size == sizeof(transport_userspace_config)) { | ||
| 61 | memcpy(&transport_userspace_config, initiator2target_buffer, initiator2target_buffer_size); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | void keyboard_post_init_transport_sync(void) { | ||
| 66 | // Register keyboard state sync split transaction | ||
| 67 | transaction_register_rpc(RPC_ID_USER_STATE_SYNC, user_state_sync); | ||
| 68 | transaction_register_rpc(RPC_ID_USER_KEYMAP_SYNC, user_keymap_sync); | ||
| 69 | transaction_register_rpc(RPC_ID_USER_CONFIG_SYNC, user_config_sync); | ||
| 70 | } | ||
| 71 | |||
| 72 | void user_transport_update(void) { | ||
| 73 | if (is_keyboard_master()) { | ||
| 74 | transport_keymap_config = keymap_config.raw; | ||
| 75 | transport_userspace_config = userspace_config.raw; | ||
| 76 | #ifdef AUDIO_ENABLE | ||
| 77 | user_state.audio_enable = is_audio_on(); | ||
| 78 | user_state.audio_clicky_enable = is_clicky_on(); | ||
| 79 | #endif | ||
| 80 | #if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) | ||
| 81 | user_state.tap_toggling = tap_toggling; | ||
| 82 | #endif | ||
| 83 | #ifdef SWAP_HANDS_ENABLE | ||
| 84 | user_state.swap_hands = swap_hands; | ||
| 85 | #endif | ||
| 86 | |||
| 87 | } else { | ||
| 88 | keymap_config.raw = transport_keymap_config; | ||
| 89 | userspace_config.raw = transport_userspace_config; | ||
| 90 | #ifdef UNICODE_ENABLE | ||
| 91 | unicode_config.input_mode = user_state.unicode_mode; | ||
| 92 | #endif | ||
| 93 | #ifdef AUDIO_ENABLE | ||
| 94 | if (delayed_tasks_run) { | ||
| 95 | if (user_state.audio_enable != is_audio_on()) { | ||
| 96 | if (user_state.audio_enable) { | ||
| 97 | audio_on(); | ||
| 98 | } else { | ||
| 99 | audio_off(); | ||
| 100 | } | ||
| 101 | } | ||
| 102 | if (user_state.audio_clicky_enable != is_clicky_on()) { | ||
| 103 | if (user_state.audio_clicky_enable) { | ||
| 104 | clicky_on(); | ||
| 105 | } else { | ||
| 106 | clicky_off(); | ||
| 107 | } | ||
| 108 | } | ||
| 109 | } | ||
| 110 | #endif | ||
| 111 | #if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) | ||
| 112 | tap_toggling = user_state.tap_toggling; | ||
| 113 | #endif | ||
| 114 | #ifdef SWAP_HANDS_ENABLE | ||
| 115 | swap_hands = user_state.swap_hands; | ||
| 116 | #endif | ||
| 117 | } | ||
| 118 | } | ||
| 119 | |||
| 120 | void user_transport_sync(void) { | ||
| 121 | if (is_keyboard_master()) { | ||
| 122 | // Keep track of the last state, so that we can tell if we need to propagate to slave | ||
| 123 | static user_runtime_config_t last_user_state; | ||
| 124 | static uint16_t last_keymap = 0; | ||
| 125 | static uint32_t last_config = 0; | ||
| 126 | static uint32_t last_sync[3]; | ||
| 127 | bool needs_sync = false; | ||
| 128 | |||
| 129 | // Check if the state values are different | ||
| 130 | if (memcmp(&user_state, &last_user_state, sizeof(user_state))) { | ||
| 131 | needs_sync = true; | ||
| 132 | memcpy(&last_user_state, &user_state, sizeof(user_state)); | ||
| 133 | } | ||
| 134 | // Send to slave every 500ms regardless of state change | ||
| 135 | if (timer_elapsed32(last_sync[0]) > 250) { | ||
| 136 | needs_sync = true; | ||
| 137 | } | ||
| 138 | |||
| 139 | // Perform the sync if requested | ||
| 140 | if (needs_sync) { | ||
| 141 | if (transaction_rpc_send(RPC_ID_USER_STATE_SYNC, sizeof(user_state), &user_state)) { | ||
| 142 | last_sync[0] = timer_read32(); | ||
| 143 | } | ||
| 144 | needs_sync = false; | ||
| 145 | } | ||
| 146 | |||
| 147 | // Check if the state values are different | ||
| 148 | if (memcmp(&transport_keymap_config, &last_keymap, sizeof(transport_keymap_config))) { | ||
| 149 | needs_sync = true; | ||
| 150 | memcpy(&last_keymap, &transport_keymap_config, sizeof(transport_keymap_config)); | ||
| 151 | } | ||
| 152 | |||
| 153 | // Send to slave every 500ms regardless of state change | ||
| 154 | if (timer_elapsed32(last_sync[1]) > 250) { | ||
| 155 | needs_sync = true; | ||
| 156 | } | ||
| 157 | |||
| 158 | // Perform the sync if requested | ||
| 159 | if (needs_sync) { | ||
| 160 | if (transaction_rpc_send(RPC_ID_USER_KEYMAP_SYNC, sizeof(transport_keymap_config), &transport_keymap_config)) { | ||
| 161 | last_sync[1] = timer_read32(); | ||
| 162 | } | ||
| 163 | needs_sync = false; | ||
| 164 | } | ||
| 165 | |||
| 166 | // Check if the state values are different | ||
| 167 | if (memcmp(&user_state, &last_config, sizeof(transport_userspace_config))) { | ||
| 168 | needs_sync = true; | ||
| 169 | memcpy(&last_config, &user_state, sizeof(transport_userspace_config)); | ||
| 170 | } | ||
| 171 | |||
| 172 | // Send to slave every 500ms regardless of state change | ||
| 173 | if (timer_elapsed32(last_sync[2]) > 250) { | ||
| 174 | needs_sync = true; | ||
| 175 | } | ||
| 176 | |||
| 177 | // Perform the sync if requested | ||
| 178 | if (needs_sync) { | ||
| 179 | if (transaction_rpc_send(RPC_ID_USER_CONFIG_SYNC, sizeof(transport_userspace_config), &transport_userspace_config)) { | ||
| 180 | last_sync[2] = timer_read32(); | ||
| 181 | } | ||
| 182 | } | ||
| 183 | } | ||
| 184 | } | ||
| 185 | |||
| 186 | void housekeeping_task_user(void) { | ||
| 187 | // Update kb_state so we can send to slave | ||
| 188 | user_transport_update(); | ||
| 189 | |||
| 190 | // Data sync from master to slave | ||
| 191 | user_transport_sync(); | ||
| 192 | } | ||
diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/transport_sync.h index a30fb0bb8..e2b3eae76 100644 --- a/users/drashna/pimoroni_trackball.h +++ b/users/drashna/transport_sync.h | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | |||
| 1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | 2 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> |
| 2 | * | 3 | * |
| 3 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
| @@ -16,20 +17,6 @@ | |||
| 16 | 17 | ||
| 17 | #pragma once | 18 | #pragma once |
| 18 | 19 | ||
| 19 | #include "quantum.h" | 20 | #include "drashna.h" |
| 20 | #include "pointing_device.h" | ||
| 21 | |||
| 22 | #ifndef TRACKBALL_ADDRESS | ||
| 23 | # define TRACKBALL_ADDRESS 0x0A | ||
| 24 | #endif | ||
| 25 | #define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE) | ||
| 26 | #define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ) | ||
| 27 | |||
| 28 | void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); | ||
| 29 | void trackball_check_click(bool pressed, report_mouse_t *mouse); | ||
| 30 | void trackball_register_button(bool pressed, enum mouse_buttons button); | ||
| 31 | 21 | ||
| 32 | float trackball_get_precision(void); | 22 | void keyboard_post_init_transport_sync(void); |
| 33 | void trackball_set_precision(float precision); | ||
| 34 | bool trackball_is_scrolling(void); | ||
| 35 | void trackball_set_scrolling(bool scroll); | ||
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index be8162dfa..8ac252926 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h | |||
| @@ -60,120 +60,120 @@ NOTE: These are all the same length. If you do a search/replace | |||
| 60 | #define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH | 60 | #define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH |
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | #define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y | 63 | #define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y |
| 64 | #define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I | 64 | #define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I |
| 65 | #define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X | 65 | #define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X |
| 66 | 66 | ||
| 67 | #define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L | 67 | #define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L |
| 68 | #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH | 68 | #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH |
| 69 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z | 69 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | #define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y | 72 | #define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y |
| 73 | #define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U | 73 | #define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U |
| 74 | #define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X | 74 | #define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X |
| 75 | 75 | ||
| 76 | #define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L | 76 | #define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L |
| 77 | #define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH | 77 | #define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH |
| 78 | #define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z | 78 | #define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z |
| 79 | 79 | ||
| 80 | #define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B | 80 | #define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B |
| 81 | #define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G | 81 | #define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G |
| 82 | #define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V | 82 | #define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V |
| 83 | 83 | ||
| 84 | #define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN | 84 | #define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN |
| 85 | #define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT | 85 | #define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT |
| 86 | #define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH | 86 | #define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH |
| 87 | 87 | ||
| 88 | 88 | ||
| 89 | #define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K | 89 | #define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K |
| 90 | #define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G | 90 | #define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G |
| 91 | #define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B | 91 | #define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B |
| 92 | 92 | ||
| 93 | #define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN | 93 | #define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN |
| 94 | #define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT | 94 | #define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT |
| 95 | #define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH | 95 | #define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH |
| 96 | 96 | ||
| 97 | 97 | ||
| 98 | #define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B | 98 | #define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B |
| 99 | #define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F | 99 | #define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F |
| 100 | #define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM | 100 | #define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM |
| 101 | 101 | ||
| 102 | #define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L | 102 | #define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L |
| 103 | #define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT | 103 | #define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT |
| 104 | #define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X | 104 | #define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X |
| 105 | 105 | ||
| 106 | 106 | ||
| 107 | #define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN | 107 | #define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN |
| 108 | #define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U | 108 | #define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U |
| 109 | #define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F | 109 | #define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F |
| 110 | 110 | ||
| 111 | #define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P | 111 | #define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P |
| 112 | #define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT | 112 | #define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT |
| 113 | #define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH | 113 | #define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH |
| 114 | 114 | ||
| 115 | // Qwerty-like | 115 | // Qwerty-like |
| 116 | #define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W | 116 | #define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W |
| 117 | #define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R | 117 | #define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R |
| 118 | #define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X | 118 | #define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X |
| 119 | 119 | ||
| 120 | #define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J | 120 | #define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J |
| 121 | #define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT | 121 | #define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT |
| 122 | #define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH | 122 | #define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH |
| 123 | 123 | ||
| 124 | // Colemak like | 124 | // Colemak like |
| 125 | #define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W | 125 | #define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W |
| 126 | #define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R | 126 | #define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R |
| 127 | #define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J | 127 | #define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J |
| 128 | 128 | ||
| 129 | #define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN | 129 | #define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN |
| 130 | #define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT | 130 | #define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT |
| 131 | #define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH | 131 | #define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH |
| 132 | 132 | ||
| 133 | // colemak like, zxcv fixed | 133 | // colemak like, zxcv fixed |
| 134 | #define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W | 134 | #define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W |
| 135 | #define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R | 135 | #define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R |
| 136 | #define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J | 136 | #define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J |
| 137 | 137 | ||
| 138 | #define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN | 138 | #define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN |
| 139 | #define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT | 139 | #define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT |
| 140 | #define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH | 140 | #define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH |
| 141 | 141 | ||
| 142 | // teeheehee | 142 | // teeheehee |
| 143 | #define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L | 143 | #define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L |
| 144 | #define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G | 144 | #define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G |
| 145 | #define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A | 145 | #define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A |
| 146 | 146 | ||
| 147 | #define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H | 147 | #define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H |
| 148 | #define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT | 148 | #define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT |
| 149 | #define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH | 149 | #define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH |
| 150 | 150 | ||
| 151 | 151 | ||
| 152 | #define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT | 152 | #define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT |
| 153 | #define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B | 153 | #define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B |
| 154 | #define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q | 154 | #define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q |
| 155 | 155 | ||
| 156 | #define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U | 156 | #define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U |
| 157 | #define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I | 157 | #define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I |
| 158 | #define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z | 158 | #define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z |
| 159 | 159 | ||
| 160 | 160 | ||
| 161 | #define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z | 161 | #define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z |
| 162 | #define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM | 162 | #define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM |
| 163 | #define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH | 163 | #define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH |
| 164 | 164 | ||
| 165 | #define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J | 165 | #define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J |
| 166 | #define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE | 166 | #define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE |
| 167 | #define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y | 167 | #define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y |
| 168 | 168 | ||
| 169 | 169 | ||
| 170 | #define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z | 170 | #define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z |
| 171 | #define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM | 171 | #define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM |
| 172 | #define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH | 172 | #define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH |
| 173 | 173 | ||
| 174 | #define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J | 174 | #define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J |
| 175 | #define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE | 175 | #define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE |
| 176 | #define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y | 176 | #define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y |
| 177 | 177 | ||
| 178 | 178 | ||
| 179 | #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 | 179 | #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 |
| @@ -181,35 +181,35 @@ NOTE: These are all the same length. If you do a search/replace | |||
| 181 | #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 | 181 | #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 |
| 182 | #define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 | 182 | #define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 |
| 183 | 183 | ||
| 184 | #define ___________________BLANK___________________ _______, _______, _______, _______, _______ | 184 | #define ___________________BLANK___________________ _______, _______, _______, _______, _______ |
| 185 | 185 | ||
| 186 | 186 | ||
| 187 | #define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC | 187 | #define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC |
| 188 | #define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ | 188 | #define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ |
| 189 | #define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ | 189 | #define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ |
| 190 | 190 | ||
| 191 | #define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN | 191 | #define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN |
| 192 | #define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR | 192 | #define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR |
| 193 | #define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END | 193 | #define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END |
| 194 | 194 | ||
| 195 | 195 | ||
| 196 | 196 | ||
| 197 | #define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ | 197 | #define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ |
| 198 | #define _________________RAISE_L2__________________ ___________________BLANK___________________ | 198 | #define _________________RAISE_L2__________________ ___________________BLANK___________________ |
| 199 | #define _________________RAISE_L3__________________ ___________________BLANK___________________ | 199 | #define _________________RAISE_L3__________________ ___________________BLANK___________________ |
| 200 | 200 | ||
| 201 | #define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ | 201 | #define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ |
| 202 | #define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC | 202 | #define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC |
| 203 | #define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 203 | #define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
| 204 | 204 | ||
| 205 | 205 | ||
| 206 | 206 | ||
| 207 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG | 207 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG |
| 208 | #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM | 208 | #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM |
| 209 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T | 209 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T |
| 210 | 210 | ||
| 211 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 | 211 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 |
| 212 | #define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN | 212 | #define _________________ADJUST_R2_________________ CG_SWAP, DEFLYR1, DEFLYR2, DEFLYR3, DEFLYR4 |
| 213 | #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT | 213 | #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT |
| 214 | 214 | ||
| 215 | // clang-format on | 215 | // clang-format on |
diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk index 462649289..00e18521b 100644 --- a/users/dshields/rules.mk +++ b/users/dshields/rules.mk | |||
| @@ -5,7 +5,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration | |||
| 5 | CONSOLE_ENABLE = no # Console for debug(+400) | 5 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 6 | EXTRAKEY_ENABLE = no | 6 | EXTRAKEY_ENABLE = no |
| 7 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 7 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 8 | API_SYSEX_ENABLE = no | ||
| 9 | SPACE_CADET_ENABLE = no | 8 | SPACE_CADET_ENABLE = no |
| 10 | LEADER_ENABLE = no | 9 | LEADER_ENABLE = no |
| 11 | DYNAMIC_MACRO_ENABLE = yes | 10 | DYNAMIC_MACRO_ENABLE = yes |
diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c index d0cd106ff..c44d8bb44 100644 --- a/users/edvorakjp/edvorakjp.c +++ b/users/edvorakjp/edvorakjp.c | |||
| @@ -7,7 +7,7 @@ void matrix_init_user(void) { | |||
| 7 | 7 | ||
| 8 | __attribute__((weak)) void matrix_init_keymap() {} | 8 | __attribute__((weak)) void matrix_init_keymap() {} |
| 9 | 9 | ||
| 10 | uint32_t layer_state_set_user(uint32_t state) { | 10 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 11 | state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST); | 11 | state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST); |
| 12 | return layer_state_set_keymap(state); | 12 | return layer_state_set_keymap(state); |
| 13 | } | 13 | } |
diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h index 5f20762c6..93cd9851b 100644 --- a/users/edvorakjp/edvorakjp.h +++ b/users/edvorakjp/edvorakjp.h | |||
| @@ -67,7 +67,7 @@ enum tap_dance_code { | |||
| 67 | // base | 67 | // base |
| 68 | void matrix_init_user(void); | 68 | void matrix_init_user(void); |
| 69 | void matrix_init_keymap(void); | 69 | void matrix_init_keymap(void); |
| 70 | uint32_t layer_state_set_user(uint32_t state); | 70 | layer_state_t layer_state_set_user(layer_state_t state); |
| 71 | uint32_t layer_state_set_keymap(uint32_t state); | 71 | uint32_t layer_state_set_keymap(uint32_t state); |
| 72 | bool process_record_user(uint16_t keycode, keyrecord_t *record); | 72 | bool process_record_user(uint16_t keycode, keyrecord_t *record); |
| 73 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | 73 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); |
diff --git a/users/ericgebhart/base_layers.h b/users/ericgebhart/base_layers.h index caf081057..fd88a40ae 100644 --- a/users/ericgebhart/base_layers.h +++ b/users/ericgebhart/base_layers.h | |||
| @@ -87,7 +87,7 @@ | |||
| 87 | 87 | ||
| 88 | // the bottom rows for keyboards on bepo. | 88 | // the bottom rows for keyboards on bepo. |
| 89 | // bepo on bepo - not enough space to go around.... | 89 | // bepo on bepo - not enough space to go around.... |
| 90 | #define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECRC, LCTL(BP_V), KC_LEFT, KC_RIGHT | 90 | #define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECIR, LCTL(BP_V), KC_LEFT, KC_RIGHT |
| 91 | #define ___BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC | 91 | #define ___BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC |
| 92 | 92 | ||
| 93 | // for dvorak on bepo | 93 | // for dvorak on bepo |
diff --git a/users/ericgebhart/core_keys.h b/users/ericgebhart/core_keys.h index 035f74001..a71d90574 100644 --- a/users/ericgebhart/core_keys.h +++ b/users/ericgebhart/core_keys.h | |||
| @@ -231,7 +231,7 @@ enum { | |||
| 231 | #define BP_SFT_T_E SFT_T(BP_E) | 231 | #define BP_SFT_T_E SFT_T(BP_E) |
| 232 | #define BP_SFT_T_M SFT_T(BP_M) | 232 | #define BP_SFT_T_M SFT_T(BP_M) |
| 233 | 233 | ||
| 234 | #define BP_SFT_T_ECRC SFT_T(BP_ECRC) | 234 | #define BP_SFT_T_ECRC SFT_T(BP_ECIR) |
| 235 | #define BP_SFT_T_CCED SFT_T(BP_CCED) | 235 | #define BP_SFT_T_CCED SFT_T(BP_CCED) |
| 236 | #define BP_LT_SYMB_COMM LT(SYMB,BP_COMM) | 236 | #define BP_LT_SYMB_COMM LT(SYMB,BP_COMM) |
| 237 | 237 | ||
diff --git a/users/ericgebhart/core_keysets.h b/users/ericgebhart/core_keysets.h index ffe02192f..5baf02ccf 100644 --- a/users/ericgebhart/core_keysets.h +++ b/users/ericgebhart/core_keysets.h | |||
| @@ -111,33 +111,33 @@ | |||
| 111 | 111 | ||
| 112 | // Bepo on fr-bepo software layer | 112 | // Bepo on fr-bepo software layer |
| 113 | // for bepo on bepo | 113 | // for bepo on bepo |
| 114 | /* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */ | 114 | /* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */ |
| 115 | #define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN | 115 | #define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN |
| 116 | /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ | 116 | /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ |
| 117 | #define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */ | 117 | #define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */ |
| 118 | 118 | ||
| 119 | #define ___BEPO_FR_L1___ BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV | 119 | #define ___BEPO_FR_L1___ BP_B, BP_EACU, BP_P, BP_O, BP_EGRV |
| 120 | #define ___BEPO_FR_L2___ BP_SFT_T_A, BP_LT_KP_U, BP_LT_SYMB_I, BP_LT_MDIA_E, BP_COMM | 120 | #define ___BEPO_FR_L2___ BP_SFT_T_A, BP_LT_KP_U, BP_LT_SYMB_I, BP_LT_MDIA_E, BP_COMM |
| 121 | #define ___BEPO_FR_L3___ /*BP_ECRC*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K | 121 | #define ___BEPO_FR_L3___ /*BP_ECIR*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K |
| 122 | 122 | ||
| 123 | #define ___BEPO_FR_R1___ /* BP_DCRC,*/ BP_V, BP_D, BP_L, BP_J, BP_Z | 123 | #define ___BEPO_FR_R1___ /* BP_DCIR,*/ BP_V, BP_D, BP_L, BP_J, BP_Z |
| 124 | #define ___BEPO_FR_R2___ /* BP_C, */ BP_T, BP_LT_SYMB_S, BP_LT_MDIA_R, BP_LT_KP_N, BP_SFT_T_M //BP_CCED | 124 | #define ___BEPO_FR_R2___ /* BP_C, */ BP_T, BP_LT_SYMB_S, BP_LT_MDIA_R, BP_LT_KP_N, BP_SFT_T_M //BP_CCED |
| 125 | #define ___BEPO_FR_R3___ BP_APOS, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W | 125 | #define ___BEPO_FR_R3___ BP_QUOT, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W |
| 126 | 126 | ||
| 127 | /* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */ | 127 | /* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */ |
| 128 | /* KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, */ | 128 | /* KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, */ |
| 129 | /* KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, */ | 129 | /* KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, */ |
| 130 | /* KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, */ | 130 | /* KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, */ |
| 131 | /* ESC_FN, BP_ECRC, KC_LGUI, KC_LALT, SPC_RALT, */ | 131 | /* ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT, */ |
| 132 | /* TT(SWAP), KC_MNXT, */ | 132 | /* TT(SWAP), KC_MNXT, */ |
| 133 | /* KC_MPLY, */ | 133 | /* KC_MPLY, */ |
| 134 | /* TT(FN), TT(NUMS), KC_MPRV, */ | 134 | /* TT(FN), TT(NUMS), KC_MPRV, */ |
| 135 | 135 | ||
| 136 | /* /\* right hand *\/ */ | 136 | /* /\* right hand *\/ */ |
| 137 | /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ | 137 | /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ |
| 138 | /* KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, */ | 138 | /* KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, */ |
| 139 | /* BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, */ | 139 | /* BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, */ |
| 140 | /* KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */ | 140 | /* KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */ |
| 141 | 141 | ||
| 142 | 142 | ||
| 143 | /*******************************************************************/ | 143 | /*******************************************************************/ |
| @@ -183,7 +183,7 @@ | |||
| 183 | #define ___KEYPAD_4_ALT___ KC_P0, KC_DOT, KC_PENT, KC_PENT | 183 | #define ___KEYPAD_4_ALT___ KC_P0, KC_DOT, KC_PENT, KC_PENT |
| 184 | 184 | ||
| 185 | // For Bepo | 185 | // For Bepo |
| 186 | #define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLASH | 186 | #define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLSH |
| 187 | #define ___KEYPAD_2_BP___ DB_4, DB_5, DB_6, BP_ASTR | 187 | #define ___KEYPAD_2_BP___ DB_4, DB_5, DB_6, BP_ASTR |
| 188 | #define ___KEYPAD_3_BP___ DB_1, DB_2, DB_3, DB_MINUS | 188 | #define ___KEYPAD_3_BP___ DB_1, DB_2, DB_3, DB_MINUS |
| 189 | #define ___KEYPAD_4_BP___ DB_0, DB_DOT, DB_EQL, BP_PLUS | 189 | #define ___KEYPAD_4_BP___ DB_0, DB_DOT, DB_EQL, BP_PLUS |
| @@ -225,9 +225,9 @@ | |||
| 225 | 225 | ||
| 226 | // SYMBOLS FOR BEPO | 226 | // SYMBOLS FOR BEPO |
| 227 | // The top row. Bepo has symbols not numbers. Numbers are the shifted values. | 227 | // The top row. Bepo has symbols not numbers. Numbers are the shifted values. |
| 228 | #define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN | 228 | #define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN |
| 229 | /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ | 229 | /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ |
| 230 | #define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */ | 230 | #define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */ |
| 231 | 231 | ||
| 232 | // An arrangement for the left hand with a focus on the ()[]{}s. | 232 | // An arrangement for the left hand with a focus on the ()[]{}s. |
| 233 | #define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE | 233 | #define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE |
| @@ -237,7 +237,7 @@ | |||
| 237 | // A larger 6 column arrangement for the left hand, A merge of dvorak and the above. | 237 | // A larger 6 column arrangement for the left hand, A merge of dvorak and the above. |
| 238 | #define ___SYMBOLS6_1_BP___ DB_GRV, DB_LESS, DB_GRTR, DB_LCBR, DB_RCBR, DB_HASH | 238 | #define ___SYMBOLS6_1_BP___ DB_GRV, DB_LESS, DB_GRTR, DB_LCBR, DB_RCBR, DB_HASH |
| 239 | #define ___SYMBOLS6_2_BP___ KC_AMPR, BP_AT, BP_ASTR, DB_LPRN, DB_RPRN, BP_PERC | 239 | #define ___SYMBOLS6_2_BP___ KC_AMPR, BP_AT, BP_ASTR, DB_LPRN, DB_RPRN, BP_PERC |
| 240 | #define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQOT, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON | 240 | #define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQUO, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON |
| 241 | #define ___SYMBOLS6_4_BP___ ___2___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON | 241 | #define ___SYMBOLS6_4_BP___ ___2___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON |
| 242 | 242 | ||
| 243 | #define ___SYMBOLS5_4_BP___ ___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON | 243 | #define ___SYMBOLS5_4_BP___ ___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON |
| @@ -248,9 +248,9 @@ | |||
| 248 | #define ___SYMPAD_1_BP___ DB_GRV, BP_AMPR, BP_ASTR, DB_LCBR, BP_PLUS, DB_PIPE | 248 | #define ___SYMPAD_1_BP___ DB_GRV, BP_AMPR, BP_ASTR, DB_LCBR, BP_PLUS, DB_PIPE |
| 249 | #define ___SYMPAD_2_BP___ DB_TILD, BP_DLR, BP_PERC, DB_CIRC, BP_ASTR, DB_GRV | 249 | #define ___SYMPAD_2_BP___ DB_TILD, BP_DLR, BP_PERC, DB_CIRC, BP_ASTR, DB_GRV |
| 250 | #define ___SYMPAD_3_BP___ ___, BP_EXLM, BP_AT, DB_HASH, BP_MINS, BP_SLSH | 250 | #define ___SYMPAD_3_BP___ ___, BP_EXLM, BP_AT, DB_HASH, BP_MINS, BP_SLSH |
| 251 | #define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH | 251 | #define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH |
| 252 | 252 | ||
| 253 | #define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH | 253 | #define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH |
| 254 | 254 | ||
| 255 | // Parts are parts. | 255 | // Parts are parts. |
| 256 | // MOUSE, ARROW and MEDIA KEY SETS | 256 | // MOUSE, ARROW and MEDIA KEY SETS |
diff --git a/users/ericgebhart/ericgebhart.c b/users/ericgebhart/ericgebhart.c index abb87899b..d34563865 100644 --- a/users/ericgebhart/ericgebhart.c +++ b/users/ericgebhart/ericgebhart.c | |||
| @@ -86,25 +86,25 @@ static void switch_default_layer(uint8_t layer) { | |||
| 86 | // reasnably sized array without difficulties. The macro is for the constant declarations | 86 | // reasnably sized array without difficulties. The macro is for the constant declarations |
| 87 | // the function is for when we use it. | 87 | // the function is for when we use it. |
| 88 | const uint8_t key_translations[][2][2] = { | 88 | const uint8_t key_translations[][2][2] = { |
| 89 | [GR(DB_1)] = {{BP_DQOT, MOD_LSFT}, {BP_DCRC, MOD_LSFT}}, | 89 | [GR(DB_1)] = {{BP_DQUO, MOD_LSFT}, {BP_DCIR, MOD_LSFT}}, |
| 90 | [GR(DB_2)] = {{BP_LGIL, MOD_LSFT}, {BP_AT, MOD_NONE}}, | 90 | [GR(DB_2)] = {{BP_LDAQ, MOD_LSFT}, {BP_AT, MOD_NONE}}, |
| 91 | [GR(DB_3)] = {{BP_RGIL, MOD_LSFT}, {BP_DLR, MOD_LSFT}}, | 91 | [GR(DB_3)] = {{BP_RDAQ, MOD_LSFT}, {BP_DLR, MOD_LSFT}}, |
| 92 | [GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}}, | 92 | [GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}}, |
| 93 | [GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}}, | 93 | [GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}}, |
| 94 | [GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}}, | 94 | [GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}}, |
| 95 | [GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}}, | 95 | [GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}}, |
| 96 | [GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}}, | 96 | [GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}}, |
| 97 | [GR(DB_9)] = {{BP_SLASH, MOD_LSFT}, {BP_LPRN, MOD_NONE}}, | 97 | [GR(DB_9)] = {{BP_SLSH, MOD_LSFT}, {BP_LPRN, MOD_NONE}}, |
| 98 | [GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}}, | 98 | [GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}}, |
| 99 | [GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}}, | 99 | [GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}}, |
| 100 | [GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}}, | 100 | [GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}}, |
| 101 | [GR(DB_SLASH)] = {{BP_SLASH, MOD_NONE}, {BP_APOS, MOD_LSFT}}, | 101 | [GR(DB_SLASH)] = {{BP_SLSH, MOD_NONE}, {BP_QUOT, MOD_LSFT}}, |
| 102 | [GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, | 102 | [GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, |
| 103 | [GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}}, | 103 | [GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}}, |
| 104 | [GR(DB_COMM)] = {{BP_COMMA, MOD_NONE}, {BP_LGIL, MOD_BIT(KC_RALT)}}, | 104 | [GR(DB_COMM)] = {{BP_COMM, MOD_NONE}, {BP_LDAQ, MOD_BIT(KC_RALT)}}, |
| 105 | [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RGIL, MOD_BIT(KC_RALT)}}, | 105 | [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RDAQ, MOD_BIT(KC_RALT)}}, |
| 106 | [GR(DB_QUOT)] = {{BP_APOS, MOD_NONE}, {BP_DQOT, MOD_NONE}}, | 106 | [GR(DB_QUOT)] = {{BP_QUOT, MOD_NONE}, {BP_DQUO, MOD_NONE}}, |
| 107 | [GR(DB_MINUS)] = {{BP_MINUS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}}, | 107 | [GR(DB_MINUS)] = {{BP_MINS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}}, |
| 108 | [GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}}, | 108 | [GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}}, |
| 109 | [GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}}, | 109 | [GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}}, |
| 110 | [GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}}, | 110 | [GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}}, |
| @@ -116,8 +116,8 @@ const uint8_t key_translations[][2][2] = { | |||
| 116 | [GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, | 116 | [GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, |
| 117 | [GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}}, | 117 | [GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}}, |
| 118 | [GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}}, | 118 | [GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}}, |
| 119 | [GR(DB_LESS)] = {{BP_LGIL, MOD_BIT(KC_RALT)}, {BP_LGIL, MOD_BIT(KC_RALT)}}, | 119 | [GR(DB_LESS)] = {{BP_LDAQ, MOD_BIT(KC_RALT)}, {BP_LDAQ, MOD_BIT(KC_RALT)}}, |
| 120 | [GR(DB_GRTR)] = {{BP_RGIL, MOD_BIT(KC_RALT)}, {BP_RGIL, MOD_BIT(KC_RALT)}}, | 120 | [GR(DB_GRTR)] = {{BP_RDAQ, MOD_BIT(KC_RALT)}, {BP_RDAQ, MOD_BIT(KC_RALT)}}, |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | 123 | ||
diff --git a/users/ericgebhart/rules.mk b/users/ericgebhart/rules.mk index 70017a595..698f6131e 100755 --- a/users/ericgebhart/rules.mk +++ b/users/ericgebhart/rules.mk | |||
| @@ -9,7 +9,6 @@ KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key | |||
| 9 | TAP_DANCE_ENABLE = yes # Enable the tap dance feature. | 9 | TAP_DANCE_ENABLE = yes # Enable the tap dance feature. |
| 10 | CONSOLE_ENABLE = no # Console for debug | 10 | CONSOLE_ENABLE = no # Console for debug |
| 11 | 11 | ||
| 12 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | 12 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 13 | UNICODE_ENABLE = no | 13 | UNICODE_ENABLE = no |
| 14 | SLEEP_LED_ENABLE = no | 14 | SLEEP_LED_ENABLE = no |
| 15 | API_SYSEX_ENABLE = no | ||
diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk index 06e671a63..c282f0028 100644 --- a/users/gordon/rules.mk +++ b/users/gordon/rules.mk | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | TAP_DANCE_ENABLE = yes | 1 | TAP_DANCE_ENABLE = yes |
| 2 | SRC += gordon.c | 2 | SRC += gordon.c |
| 3 | 3 | ||
| 4 | # BOOTMAGIC_ENABLE = full | ||
diff --git a/users/issmirnov/rules.mk b/users/issmirnov/rules.mk index 93ec21b01..d96083f7d 100644 --- a/users/issmirnov/rules.mk +++ b/users/issmirnov/rules.mk | |||
| @@ -19,7 +19,7 @@ NKRO_ENABLE = no # note: also needs FORCE_NKRO in config.h | |||
| 19 | # Disable unused features to save on space | 19 | # Disable unused features to save on space |
| 20 | # https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ | 20 | # https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ |
| 21 | MOUSEKEY_ENABLE = no # 2000 bytes | 21 | MOUSEKEY_ENABLE = no # 2000 bytes |
| 22 | BOOTMAGIC_ENABLE = no | 22 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 23 | COMMAND_ENABLE = no # https://beta.docs.qmk.fm/features/feature_command | 23 | COMMAND_ENABLE = no # https://beta.docs.qmk.fm/features/feature_command |
| 24 | UNICODE_ENABLE = no # Unicode | 24 | UNICODE_ENABLE = no # Unicode |
| 25 | SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard | 25 | SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard |
diff --git a/users/jdelkins/rules.mk b/users/jdelkins/rules.mk index 76d391d70..075aab7d3 100644 --- a/users/jdelkins/rules.mk +++ b/users/jdelkins/rules.mk | |||
| @@ -12,4 +12,4 @@ users/jdelkins/secrets.h: users/jdelkins/secrets.h.gpg | |||
| 12 | gpg -d $< >$@ | 12 | gpg -d $< >$@ |
| 13 | endif | 13 | endif |
| 14 | 14 | ||
| 15 | BOOTMAGIC_ENABLE = no | 15 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
diff --git a/users/jonavin/config.h b/users/jonavin/config.h index 4f4568f70..440d222df 100644 --- a/users/jonavin/config.h +++ b/users/jonavin/config.h | |||
| @@ -26,5 +26,5 @@ | |||
| 26 | 26 | ||
| 27 | #ifdef RGB_MATRIX_ENABLE | 27 | #ifdef RGB_MATRIX_ENABLE |
| 28 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR | 28 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR |
| 29 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true | 29 | # define RGB_DISABLE_WHEN_USB_SUSPENDED |
| 30 | #endif | 30 | #endif |
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 72aca9fb8..3fdf5a4ca 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c | |||
| @@ -97,7 +97,7 @@ uint32_t layer_state_set_keymap(uint32_t state) { | |||
| 97 | return state; | 97 | return state; |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | uint32_t layer_state_set_user(uint32_t state) { | 100 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 101 | state = layer_state_set_keymap(state); | 101 | state = layer_state_set_keymap(state); |
| 102 | 102 | ||
| 103 | #ifdef LAYER_NUMPAD | 103 | #ifdef LAYER_NUMPAD |
diff --git a/users/kuchosauronad0/kuchosauronad0.c b/users/kuchosauronad0/kuchosauronad0.c index 6c38d0f10..a8f17b08e 100644 --- a/users/kuchosauronad0/kuchosauronad0.c +++ b/users/kuchosauronad0/kuchosauronad0.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | Copyright 2019 Andre Poley <andre.poley@mailbox.org> | 2 | Copyright 2019 Andre Poley <andre.poley@mailbox.org> |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
| @@ -123,7 +123,7 @@ uint32_t layer_state_set_keymap (uint32_t state) { | |||
| 123 | 123 | ||
| 124 | // on layer change, no matter where the change was initiated | 124 | // on layer change, no matter where the change was initiated |
| 125 | // Then runs keymap's layer change check | 125 | // Then runs keymap's layer change check |
| 126 | uint32_t layer_state_set_user(uint32_t state) { | 126 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 127 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | 127 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); |
| 128 | #ifdef RGBLIGHT_ENABLE | 128 | #ifdef RGBLIGHT_ENABLE |
| 129 | state = layer_state_set_rgb(state); | 129 | state = layer_state_set_rgb(state); |
diff --git a/users/losinggeneration/rules.mk b/users/losinggeneration/rules.mk index 295367fbc..41d6f9167 100644 --- a/users/losinggeneration/rules.mk +++ b/users/losinggeneration/rules.mk | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | # Only enable things here that are generic to all keyboards. A yes or no here | 2 | # Only enable things here that are generic to all keyboards. A yes or no here |
| 3 | # will override keyboard/keymap specific values | 3 | # will override keyboard/keymap specific values |
| 4 | # | 4 | # |
| 5 | #BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 6 | #COMMAND_ENABLE = no # Commands for debug and configuration | 5 | #COMMAND_ENABLE = no # Commands for debug and configuration |
| 7 | #CONSOLE_ENABLE = no # Console for debug(+400) | 6 | #CONSOLE_ENABLE = no # Console for debug(+400) |
| 8 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
diff --git a/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk b/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk index 7eb39e108..41273a9a6 100644 --- a/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk +++ b/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # change to "no" to disable the options, or define them in the Makefile in | 2 | # change to "no" to disable the options, or define them in the Makefile in |
| 3 | # the appropriate keymap folder that will get included automatically | 3 | # the appropriate keymap folder that will get included automatically |
| 4 | # | 4 | # |
| 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | 5 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 6 | MOUSEKEY_ENABLE = yes # Mouse keys | 6 | MOUSEKEY_ENABLE = yes # Mouse keys |
| 7 | EXTRAKEY_ENABLE = yes # Audio control and System control | 7 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 8 | CONSOLE_ENABLE = no # Console for debug | 8 | CONSOLE_ENABLE = no # Console for debug |
diff --git a/users/mtdjr/mtdjr.c b/users/mtdjr/mtdjr.c index c31b077b4..9c6c26bc8 100644 --- a/users/mtdjr/mtdjr.c +++ b/users/mtdjr/mtdjr.c | |||
| @@ -136,7 +136,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 136 | return true; | 136 | return true; |
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | uint32_t layer_state_set_user(uint32_t state) { | 139 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 140 | switch (biton32(state)) { | 140 | switch (biton32(state)) { |
| 141 | case _RAISE: | 141 | case _RAISE: |
| 142 | #ifdef RGBLIGHT_ENABLE | 142 | #ifdef RGBLIGHT_ENABLE |
diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index a3514f54f..1d88c3057 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #include <stdio.h> | 2 | #include <stdio.h> |
| 3 | #include "ninjonas.h" | 3 | #include "ninjonas.h" |
| 4 | 4 | ||
| 5 | #if defined(OLED_DRIVER_ENABLE) & !defined(KEYBOARD_kyria_rev1) | 5 | #if defined(OLED_ENABLE) & !defined(KEYBOARD_kyria_rev1) |
| 6 | 6 | ||
| 7 | static uint32_t oled_timer = 0; | 7 | static uint32_t oled_timer = 0; |
| 8 | 8 | ||
| @@ -49,16 +49,16 @@ void render_layer_state(void) { | |||
| 49 | bool adjust = layer_state_is(_ADJUST); | 49 | bool adjust = layer_state_is(_ADJUST); |
| 50 | bool numpad = layer_state_is(_NUMPAD); | 50 | bool numpad = layer_state_is(_NUMPAD); |
| 51 | 51 | ||
| 52 | if(lower){ | 52 | if(lower){ |
| 53 | oled_write_P(PSTR(" Lower "), true); | 53 | oled_write_P(PSTR(" Lower "), true); |
| 54 | } else if(raise){ | 54 | } else if(raise){ |
| 55 | oled_write_P(PSTR(" Raise "), true); | 55 | oled_write_P(PSTR(" Raise "), true); |
| 56 | } else if(adjust){ | 56 | } else if(adjust){ |
| 57 | oled_write_P(PSTR(" Adjust "), true); | 57 | oled_write_P(PSTR(" Adjust "), true); |
| 58 | } else if(numpad) { | 58 | } else if(numpad) { |
| 59 | oled_write_P(PSTR(" Numpad "), true); | 59 | oled_write_P(PSTR(" Numpad "), true); |
| 60 | } else { | 60 | } else { |
| 61 | oled_write_P(PSTR(" Default"), false); | 61 | oled_write_P(PSTR(" Default"), false); |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | 64 | ||
diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c index a3b841791..c298227e5 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; | |||
| 6 | __attribute__((weak)) | 6 | __attribute__((weak)) |
| 7 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } | 7 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } |
| 8 | 8 | ||
| 9 | #ifdef OLED_DRIVER_ENABLE | 9 | #ifdef OLED_ENABLE |
| 10 | __attribute__((weak)) | 10 | __attribute__((weak)) |
| 11 | bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; } | 11 | bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; } |
| 12 | #endif | 12 | #endif |
| @@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | return process_record_keymap(keycode, record) && process_record_secrets(keycode, record) | 112 | return process_record_keymap(keycode, record) && process_record_secrets(keycode, record) |
| 113 | #ifdef OLED_DRIVER_ENABLE | 113 | #ifdef OLED_ENABLE |
| 114 | && process_record_oled(keycode, record) | 114 | && process_record_oled(keycode, record) |
| 115 | #endif | 115 | #endif |
| 116 | ; // Close return | 116 | ; // Close return |
diff --git a/users/ninjonas/process_records.h b/users/ninjonas/process_records.h index 2e69ca216..5b901a165 100644 --- a/users/ninjonas/process_records.h +++ b/users/ninjonas/process_records.h | |||
| @@ -25,6 +25,6 @@ enum custom_keycodes { | |||
| 25 | 25 | ||
| 26 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record); | 26 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record); |
| 27 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | 27 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); |
| 28 | #ifdef OLED_DRIVER_ENABLE | 28 | #ifdef OLED_ENABLE |
| 29 | bool process_record_oled(uint16_t keycode, keyrecord_t *record); | 29 | bool process_record_oled(uint16_t keycode, keyrecord_t *record); |
| 30 | #endif | 30 | #endif |
diff --git a/users/ninjonas/rules.mk b/users/ninjonas/rules.mk index a5cd0fdd9..7ff8f24b9 100644 --- a/users/ninjonas/rules.mk +++ b/users/ninjonas/rules.mk | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | BOOTMAGIC_ENABLE = no # Disable Boot Magic (https://beta.docs.qmk.fm/features/feature_bootmagic) | 1 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 2 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | 2 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) |
| 3 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 3 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 4 | TAP_DANCE_ENABLE = yes # Enable Tap Dance. | 4 | TAP_DANCE_ENABLE = yes # Enable Tap Dance. |
diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c index 31c3023e8..71f9210ae 100644 --- a/users/pvinis/pvinis.c +++ b/users/pvinis/pvinis.c | |||
| @@ -10,7 +10,7 @@ float song_test[][2] = SONG(QWERTY_SOUND); | |||
| 10 | #endif | 10 | #endif |
| 11 | 11 | ||
| 12 | // SYMBOL + SYSCTL = KBCTL | 12 | // SYMBOL + SYSCTL = KBCTL |
| 13 | uint32_t layer_state_set_user(uint32_t state) { | 13 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 14 | uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); | 14 | uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); |
| 15 | intermediate_state = layer_state_set_user_keymap(intermediate_state); | 15 | intermediate_state = layer_state_set_user_keymap(intermediate_state); |
| 16 | return intermediate_state; | 16 | return intermediate_state; |
diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c index 6e548f1d8..6e6a7c23c 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) { | |||
| 173 | return true; | 173 | return true; |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | #ifdef OLED_DRIVER_ENABLE | 176 | #ifdef OLED_ENABLE |
| 177 | 177 | ||
| 178 | static char receive_buffer[128] = {}; | 178 | static char receive_buffer[128] = {}; |
| 179 | static uint8_t receive_buffer_length = 0; | 179 | static uint8_t receive_buffer_length = 0; |
| @@ -227,4 +227,4 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { | |||
| 227 | 227 | ||
| 228 | #endif | 228 | #endif |
| 229 | 229 | ||
| 230 | #endif \ No newline at end of file | 230 | #endif |
diff --git a/users/ridingqwerty/rules.mk b/users/ridingqwerty/rules.mk index 153e5ff90..93b88068e 100644 --- a/users/ridingqwerty/rules.mk +++ b/users/ridingqwerty/rules.mk | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | SRC += ridingqwerty.c \ | 1 | SRC += ridingqwerty.c \ |
| 2 | process_records.c | 2 | process_records.c |
| 3 | 3 | ||
| 4 | BOOTMAGIC_ENABLE = lite | 4 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite |
| 5 | CONSOLE_ENABLE = no | 5 | CONSOLE_ENABLE = no |
| 6 | COMMAND_ENABLE = no | 6 | COMMAND_ENABLE = no |
| 7 | UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE | 7 | UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE |
diff --git a/users/romus/romus.c b/users/romus/romus.c index 35b524f94..f707bb884 100644 --- a/users/romus/romus.c +++ b/users/romus/romus.c | |||
| @@ -72,7 +72,7 @@ __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { } | |||
| 72 | // Set RGBLIGHT state depending on layer | 72 | // Set RGBLIGHT state depending on layer |
| 73 | void rgblight_change( uint8_t this_layer ) { | 73 | void rgblight_change( uint8_t this_layer ) { |
| 74 | // Enable RGB light; will not work without this | 74 | // Enable RGB light; will not work without this |
| 75 | //rgblight_enable_noeeprom(); | 75 | //rgblight_enable_noeeprom(); |
| 76 | // Change RGB light | 76 | // Change RGB light |
| 77 | switch ( this_layer ) { | 77 | switch ( this_layer ) { |
| 78 | case _DV: | 78 | case _DV: |
| @@ -83,21 +83,21 @@ void rgblight_change( uint8_t this_layer ) { | |||
| 83 | // Do yellow for alternate | 83 | // Do yellow for alternate |
| 84 | rgblight_enable_noeeprom(); | 84 | rgblight_enable_noeeprom(); |
| 85 | rgblight_sethsv_noeeprom( 60,255,255); | 85 | rgblight_sethsv_noeeprom( 60,255,255); |
| 86 | 86 | ||
| 87 | 87 | ||
| 88 | break; | 88 | break; |
| 89 | case _GA: | 89 | case _GA: |
| 90 | // Do purple for game | 90 | // Do purple for game |
| 91 | rgblight_enable_noeeprom(); | 91 | rgblight_enable_noeeprom(); |
| 92 | rgblight_sethsv_noeeprom(285,255,255); | 92 | rgblight_sethsv_noeeprom(285,255,255); |
| 93 | 93 | ||
| 94 | 94 | ||
| 95 | break; | 95 | break; |
| 96 | case _NU: | 96 | case _NU: |
| 97 | // Do azure for number | 97 | // Do azure for number |
| 98 | rgblight_enable_noeeprom(); | 98 | rgblight_enable_noeeprom(); |
| 99 | rgblight_sethsv_noeeprom(186,200,255); | 99 | rgblight_sethsv_noeeprom(186,200,255); |
| 100 | 100 | ||
| 101 | 101 | ||
| 102 | break; | 102 | break; |
| 103 | case _SE: | 103 | case _SE: |
| @@ -105,27 +105,27 @@ void rgblight_change( uint8_t this_layer ) { | |||
| 105 | rgblight_enable_noeeprom(); | 105 | rgblight_enable_noeeprom(); |
| 106 | 106 | ||
| 107 | rgblight_sethsv_noeeprom( 16,255,255); | 107 | rgblight_sethsv_noeeprom( 16,255,255); |
| 108 | 108 | ||
| 109 | break; | 109 | break; |
| 110 | case _MO: | 110 | case _MO: |
| 111 | // Do green for mouse | 111 | // Do green for mouse |
| 112 | rgblight_enable_noeeprom(); | 112 | rgblight_enable_noeeprom(); |
| 113 | rgblight_sethsv_noeeprom(120,255,255); | 113 | rgblight_sethsv_noeeprom(120,255,255); |
| 114 | 114 | ||
| 115 | 115 | ||
| 116 | break; | 116 | break; |
| 117 | case _MU: | 117 | case _MU: |
| 118 | // Do orange for music | 118 | // Do orange for music |
| 119 | 119 | ||
| 120 | rgblight_enable_noeeprom(); | 120 | rgblight_enable_noeeprom(); |
| 121 | rgblight_sethsv_noeeprom( 39,255,255); | 121 | rgblight_sethsv_noeeprom( 39,255,255); |
| 122 | 122 | ||
| 123 | break; | 123 | break; |
| 124 | default: | 124 | default: |
| 125 | // Something went wrong | 125 | // Something went wrong |
| 126 | rgblight_enable_noeeprom(); | 126 | rgblight_enable_noeeprom(); |
| 127 | rgblight_sethsv_noeeprom( 0,255,255); | 127 | rgblight_sethsv_noeeprom( 0,255,255); |
| 128 | 128 | ||
| 129 | break; | 129 | break; |
| 130 | } | 130 | } |
| 131 | } | 131 | } |
| @@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 189 | } | 189 | } |
| 190 | return false; | 190 | return false; |
| 191 | break; | 191 | break; |
| 192 | #endif | 192 | #endif |
| 193 | 193 | ||
| 194 | // Lock functionality: These layers are locked if the LOCKED buttons are | 194 | // Lock functionality: These layers are locked if the LOCKED buttons are |
| 195 | // pressed. Otherwise, they are momentary toggles | 195 | // pressed. Otherwise, they are momentary toggles |
| @@ -225,7 +225,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 225 | } | 225 | } |
| 226 | return false; | 226 | return false; |
| 227 | break; | 227 | break; |
| 228 | 228 | ||
| 229 | // Layer switches with sound | 229 | // Layer switches with sound |
| 230 | case K_GAMES: | 230 | case K_GAMES: |
| 231 | if (record->event.pressed) { | 231 | if (record->event.pressed) { |
| @@ -546,7 +546,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 546 | |*-----LAYER CHANGE-----*| | 546 | |*-----LAYER CHANGE-----*| |
| 547 | \*----------------------*/ | 547 | \*----------------------*/ |
| 548 | 548 | ||
| 549 | uint32_t layer_state_set_user(uint32_t state) { | 549 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 550 | 550 | ||
| 551 | state = layer_state_set_keymap (state); | 551 | state = layer_state_set_keymap (state); |
| 552 | #ifdef RGBLIGHT_ENABLE | 552 | #ifdef RGBLIGHT_ENABLE |
| @@ -554,4 +554,4 @@ uint32_t layer_state_set_user(uint32_t state) { | |||
| 554 | rgblight_change( biton32(state) ); | 554 | rgblight_change( biton32(state) ); |
| 555 | #endif | 555 | #endif |
| 556 | return state; | 556 | return state; |
| 557 | } \ No newline at end of file | 557 | } |
diff --git a/users/romus/rules.mk b/users/romus/rules.mk index 12bbabb02..32a5ab092 100644 --- a/users/romus/rules.mk +++ b/users/romus/rules.mk | |||
| @@ -10,14 +10,12 @@ ifndef BLUETOOTH_ENABLE | |||
| 10 | BLUETOOTH_ENABLE = no # No bluetooth | 10 | BLUETOOTH_ENABLE = no # No bluetooth |
| 11 | endif | 11 | endif |
| 12 | COMMAND_ENABLE = no # Some bootmagic thing i dont use | 12 | COMMAND_ENABLE = no # Some bootmagic thing i dont use |
| 13 | BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed | 13 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 14 | CONSOLE_ENABLE = no # Allows console output with a command | 14 | CONSOLE_ENABLE = no # Allows console output with a command |
| 15 | SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. | 15 | SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. |
| 16 | NKRO_ENABLE = no # Default is 6KRO which is plenty | 16 | NKRO_ENABLE = no # Default is 6KRO which is plenty |
| 17 | MIDI_ENABLE = no # Untested feature | 17 | MIDI_ENABLE = no # Untested feature |
| 18 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used | 18 | KEY_LOCK_ENABLE = no # Allows locking any key. Not used |
| 19 | API_SYSEX_ENABLE = no # Allows OS to send signals. | ||
| 20 | |||
| 21 | 19 | ||
| 22 | # Disabling this makes it compile, i dont know why | 20 | # Disabling this makes it compile, i dont know why |
| 23 | # VARIABLE_TRACE = no # Allows debugging variables | 21 | # VARIABLE_TRACE = no # Allows debugging variables |
diff --git a/users/sethBarberee/sethBarberee.c b/users/sethBarberee/sethBarberee.c index 536f3f921..c5fceee68 100644 --- a/users/sethBarberee/sethBarberee.c +++ b/users/sethBarberee/sethBarberee.c | |||
| @@ -58,7 +58,7 @@ void keyboard_post_init_user(void) | |||
| 58 | __attribute__((weak)) void suspend_power_down_keymap(void) {} | 58 | __attribute__((weak)) void suspend_power_down_keymap(void) {} |
| 59 | 59 | ||
| 60 | void suspend_power_down_user(void) { | 60 | void suspend_power_down_user(void) { |
| 61 | #ifdef OLED_DRIVER_ENABLE | 61 | #ifdef OLED_ENABLE |
| 62 | oled_off(); | 62 | oled_off(); |
| 63 | #endif | 63 | #endif |
| 64 | suspend_power_down_keymap(); | 64 | suspend_power_down_keymap(); |
diff --git a/users/sigul/sigul.c b/users/sigul/sigul.c index 0995ca736..16bcd411d 100644 --- a/users/sigul/sigul.c +++ b/users/sigul/sigul.c | |||
| @@ -40,13 +40,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 40 | case IT_APDQ: | 40 | case IT_APDQ: |
| 41 | if (record->event.pressed){ | 41 | if (record->event.pressed){ |
| 42 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | 42 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ |
| 43 | register_code16(IT_DQOT); | 43 | register_code16(IT_DQUO); |
| 44 | } else { | 44 | } else { |
| 45 | register_code16(IT_APOS); | 45 | register_code16(IT_QUOT); |
| 46 | } | 46 | } |
| 47 | } else { | 47 | } else { |
| 48 | unregister_code16(IT_DQOT); | 48 | unregister_code16(IT_DQUO); |
| 49 | unregister_code16(IT_APOS); | 49 | unregister_code16(IT_QUOT); |
| 50 | } | 50 | } |
| 51 | return false; | 51 | return false; |
| 52 | break; | 52 | break; |
| @@ -55,13 +55,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 55 | if (record->event.pressed){ | 55 | if (record->event.pressed){ |
| 56 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | 56 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ |
| 57 | unregister_code16(KC_LSFT); | 57 | unregister_code16(KC_LSFT); |
| 58 | register_code16(IT_LESS); | 58 | register_code16(IT_LABK); |
| 59 | register_code16(KC_LSFT); | 59 | register_code16(KC_LSFT); |
| 60 | } else { | 60 | } else { |
| 61 | register_code16(IT_COMM); | 61 | register_code16(IT_COMM); |
| 62 | } | 62 | } |
| 63 | } else { | 63 | } else { |
| 64 | unregister_code16(IT_LESS); | 64 | unregister_code16(IT_LABK); |
| 65 | unregister_code16(IT_COMM); | 65 | unregister_code16(IT_COMM); |
| 66 | } | 66 | } |
| 67 | return false; | 67 | return false; |
| @@ -70,12 +70,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 70 | case IT_DTMR: | 70 | case IT_DTMR: |
| 71 | if (record->event.pressed){ | 71 | if (record->event.pressed){ |
| 72 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | 72 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ |
| 73 | register_code16(IT_MORE); | 73 | register_code16(IT_RABK); |
| 74 | } else { | 74 | } else { |
| 75 | register_code16(IT_DOT); | 75 | register_code16(IT_DOT); |
| 76 | } | 76 | } |
| 77 | } else { | 77 | } else { |
| 78 | unregister_code16(IT_MORE); | 78 | unregister_code16(IT_RABK); |
| 79 | unregister_code16(IT_DOT); | 79 | unregister_code16(IT_DOT); |
| 80 | } | 80 | } |
| 81 | return false; | 81 | return false; |
| @@ -84,12 +84,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 84 | case IT_SLQS: | 84 | case IT_SLQS: |
| 85 | if (record->event.pressed){ | 85 | if (record->event.pressed){ |
| 86 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | 86 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ |
| 87 | register_code16(IT_QST); | 87 | register_code16(IT_QUES); |
| 88 | } else { | 88 | } else { |
| 89 | register_code16(IT_SLSH); | 89 | register_code16(IT_SLSH); |
| 90 | } | 90 | } |
| 91 | } else { | 91 | } else { |
| 92 | unregister_code16(IT_QST); | 92 | unregister_code16(IT_QUES); |
| 93 | unregister_code16(IT_SLSH); | 93 | unregister_code16(IT_SLSH); |
| 94 | } | 94 | } |
| 95 | return false; | 95 | return false; |
diff --git a/users/sigul/sigul.h b/users/sigul/sigul.h index 6adc67063..8f806017c 100644 --- a/users/sigul/sigul.h +++ b/users/sigul/sigul.h | |||
| @@ -15,10 +15,10 @@ enum userspace_layers { | |||
| 15 | enum userspace_custom_keycodes { | 15 | enum userspace_custom_keycodes { |
| 16 | QWERTY = SAFE_RANGE, | 16 | QWERTY = SAFE_RANGE, |
| 17 | // custom keycodes for an Italian ANSI layout with accented vowels | 17 | // custom keycodes for an Italian ANSI layout with accented vowels |
| 18 | IT_CMLS, // IT_COMM and IT_LESS when combined with shift | 18 | IT_CMLS, // IT_COMM and IT_LABK when combined with shift |
| 19 | IT_DTMR, // IT_DOT and IT_MORE when combined with shift | 19 | IT_DTMR, // IT_DOT and IT_RABK when combined with shift |
| 20 | IT_SLQS, // IT_SLSH and IT_QST when combined with shift | 20 | IT_SLQS, // IT_SLSH and IT_QUES when combined with shift |
| 21 | IT_APDQ, // IT_APO and IT_DQOT when combined with shift | 21 | IT_APDQ, // IT_APO and IT_DQUO when combined with shift |
| 22 | IT_SCCL, // IT_SMCL and IT_COLN when combined with shift | 22 | IT_SCCL, // IT_SMCL and IT_COLN when combined with shift |
| 23 | SECRET0, | 23 | SECRET0, |
| 24 | SECRET1, | 24 | SECRET1, |
diff --git a/users/snowe/oled_setup.c b/users/snowe/oled_setup.c index b3e04df45..3d21ea9f0 100644 --- a/users/snowe/oled_setup.c +++ b/users/snowe/oled_setup.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #ifdef OLED_DRIVER_ENABLE | 19 | #ifdef OLED_ENABLE |
| 20 | 20 | ||
| 21 | # include QMK_KEYBOARD_H | 21 | # include QMK_KEYBOARD_H |
| 22 | # include "quantum.h" | 22 | # include "quantum.h" |
| @@ -138,4 +138,4 @@ void oled_task_user(void) { | |||
| 138 | } | 138 | } |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | #endif // OLED_DRIVER_ENABLE | 141 | #endif // OLED_ENABLE |
diff --git a/users/snowe/oled_setup.h b/users/snowe/oled_setup.h index 031ce6bd0..7281dcd76 100644 --- a/users/snowe/oled_setup.h +++ b/users/snowe/oled_setup.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #pragma once | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include "quantum.h" | 20 | #include "quantum.h" |
| 21 | #ifdef OLED_DRIVER_ENABLE | 21 | #ifdef OLED_ENABLE |
| 22 | # include "oled_driver.h" | 22 | # include "oled_driver.h" |
| 23 | # define OLED_RENDER_WPM_COUNTER " WPM: " | 23 | # define OLED_RENDER_WPM_COUNTER " WPM: " |
| 24 | #endif | 24 | #endif |
| @@ -27,4 +27,4 @@ | |||
| 27 | #endif | 27 | #endif |
| 28 | #ifdef OCEAN_DREAM_ENABLE | 28 | #ifdef OCEAN_DREAM_ENABLE |
| 29 | # include "ocean_dream.h" | 29 | # include "ocean_dream.h" |
| 30 | #endif \ No newline at end of file | 30 | #endif |
diff --git a/users/snowe/readme_ocean_dream.md b/users/snowe/readme_ocean_dream.md index ca15dd47c..688afc899 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) { | |||
| 41 | ``` | 41 | ``` |
| 42 | 4. In your `rules.mk` to make it easier to turn the animation on/off, add | 42 | 4. In your `rules.mk` to make it easier to turn the animation on/off, add |
| 43 | ```makefile | 43 | ```makefile |
| 44 | ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) | 44 | ifeq ($(strip $(OLED_ENABLE)), yes) |
| 45 | #... your code here... | 45 | #... your code here... |
| 46 | 46 | ||
| 47 | ifdef OCEAN_DREAM_ENABLE | 47 | ifdef OCEAN_DREAM_ENABLE |
| @@ -59,7 +59,8 @@ endif | |||
| 59 | 59 | ||
| 60 | You're done! Now you can enable **Ocean Dream** by simply turning on the OLED feature | 60 | You're done! Now you can enable **Ocean Dream** by simply turning on the OLED feature |
| 61 | ```makefile | 61 | ```makefile |
| 62 | OLED_DRIVER_ENABLE = yes | 62 | OLED_ENABLE = yes |
| 63 | OLED_DRIVER = SSD1306 | ||
| 63 | ``` | 64 | ``` |
| 64 | 65 | ||
| 65 | And if you want to disable it without turning off the OLED Driver you can simply set | 66 | 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 a6e152c1c..f188c9022 100644 --- a/users/snowe/rules.mk +++ b/users/snowe/rules.mk | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | ||
| 2 | 2 | ||
| 3 | ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) | 3 | ifeq ($(strip $(OLED_ENABLE)), yes) |
| 4 | SRC += oled_setup.c | 4 | SRC += oled_setup.c |
| 5 | 5 | ||
| 6 | ifdef OCEAN_DREAM_ENABLE | 6 | ifdef OCEAN_DREAM_ENABLE |
diff --git a/users/snowe/snowe.h b/users/snowe/snowe.h index 4453b2646..21764ca50 100644 --- a/users/snowe/snowe.h +++ b/users/snowe/snowe.h | |||
| @@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 35 | //#if defined(RGB_MATRIX_ENABLE) | 35 | //#if defined(RGB_MATRIX_ENABLE) |
| 36 | //# include "rgb_matrix_stuff.h" | 36 | //# include "rgb_matrix_stuff.h" |
| 37 | //#endif | 37 | //#endif |
| 38 | #ifdef OLED_DRIVER_ENABLE | 38 | #ifdef OLED_ENABLE |
| 39 | # include "oled_setup.h" | 39 | # include "oled_setup.h" |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c index bbd864aa9..3141b8758 100644 --- a/users/spacebarracecar/spacebarracecar.c +++ b/users/spacebarracecar/spacebarracecar.c | |||
| @@ -178,11 +178,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 178 | } | 178 | } |
| 179 | return false; | 179 | return false; |
| 180 | case CU_AE: | 180 | case CU_AE: |
| 181 | UML(DE_AE) | 181 | UML(DE_ADIA) |
| 182 | case CU_OE: | 182 | case CU_OE: |
| 183 | UML(DE_OE) | 183 | UML(DE_ODIA) |
| 184 | case CU_UE: | 184 | case CU_UE: |
| 185 | UML(DE_UE) | 185 | UML(DE_UDIA) |
| 186 | case CU_SS: | 186 | case CU_SS: |
| 187 | if(record->event.pressed) { | 187 | if(record->event.pressed) { |
| 188 | timer_timeout(); | 188 | timer_timeout(); |
| @@ -291,9 +291,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 291 | } | 291 | } |
| 292 | return false; | 292 | return false; |
| 293 | case CU_COMM: | 293 | case CU_COMM: |
| 294 | SHIFT_NO(DE_COMM, DE_LESS) | 294 | SHIFT_NO(DE_COMM, DE_LABK) |
| 295 | case CU_DOT: | 295 | case CU_DOT: |
| 296 | SHIFT_NORM(DE_DOT, DE_LESS) | 296 | SHIFT_NORM(DE_DOT, DE_LABK) |
| 297 | case CU_SLSH: | 297 | case CU_SLSH: |
| 298 | SHIFT_ALL(DE_7, DE_SS) | 298 | SHIFT_ALL(DE_7, DE_SS) |
| 299 | case CU_SCLN: | 299 | case CU_SCLN: |
| @@ -315,7 +315,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 315 | case CU_RBRC: | 315 | case CU_RBRC: |
| 316 | SHIFT_ALGR(DE_9, DE_0) | 316 | SHIFT_ALGR(DE_9, DE_0) |
| 317 | case CU_BSLS: | 317 | case CU_BSLS: |
| 318 | SHIFT_ALGR(DE_SS, DE_LESS) | 318 | SHIFT_ALGR(DE_SS, DE_LABK) |
| 319 | case CU_Z: | 319 | case CU_Z: |
| 320 | CTRL(DE_Z, KC_Z) | 320 | CTRL(DE_Z, KC_Z) |
| 321 | case CU_Y: | 321 | case CU_Y: |
diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 7062fde03..f5f5e07f0 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #define LED_DISABLE_WHEN_USB_SUSPENDED true | 3 | #define LED_DISABLE_WHEN_USB_SUSPENDED |
| 4 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true | 4 | #define RGB_DISABLE_WHEN_USB_SUSPENDED |
| 5 | #define RGBLIGHT_LAYERS | 5 | #define RGBLIGHT_LAYERS |
| 6 | #define RGBLIGHT_MAX_LAYERS 17 | 6 | #define RGBLIGHT_MAX_LAYERS 17 |
| 7 | #define RGBLIGHT_LAYER_BLINK | 7 | #define RGBLIGHT_LAYER_BLINK |
diff --git a/users/spidey3/rules.mk b/users/spidey3/rules.mk index bd378f545..69327038b 100644 --- a/users/spidey3/rules.mk +++ b/users/spidey3/rules.mk | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | BOOTMAGIC_ENABLE = lite | 1 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite |
| 2 | CONSOLE_ENABLE = yes # Console for debug | 2 | CONSOLE_ENABLE = yes # Console for debug |
| 3 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 3 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 4 | LTO_ENABLE = yes | 4 | LTO_ENABLE = yes |
diff --git a/users/spotpuff/rules.mk b/users/spotpuff/rules.mk index 279054837..7b4abdbc1 100644 --- a/users/spotpuff/rules.mk +++ b/users/spotpuff/rules.mk | |||
| @@ -1 +1 @@ | |||
| BOOTMAGIC_ENABLE = no | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | ||
diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c index 58f17489a..6d57198f3 100644 --- a/users/stanrc85/layer_rgb.c +++ b/users/stanrc85/layer_rgb.c | |||
| @@ -4,7 +4,7 @@ void matrix_init_user(void) { | |||
| 4 | rgblight_setrgb(0xFF, 0x00, 0x00); | 4 | rgblight_setrgb(0xFF, 0x00, 0x00); |
| 5 | }; | 5 | }; |
| 6 | 6 | ||
| 7 | uint32_t layer_state_set_user(uint32_t state) { | 7 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 8 | switch (biton32(state)) { | 8 | switch (biton32(state)) { |
| 9 | case 0: | 9 | case 0: |
| 10 | rgblight_setrgb (0xFF, 0x00, 0x00); | 10 | rgblight_setrgb (0xFF, 0x00, 0x00); |
diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index 42ffb411a..632e725b7 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk | |||
| @@ -13,4 +13,4 @@ TAP_DANCE_ENABLE=yes | |||
| 13 | CONSOLE_ENABLE=no | 13 | CONSOLE_ENABLE=no |
| 14 | COMMAND_ENABLE=no | 14 | COMMAND_ENABLE=no |
| 15 | DYNAMIC_KEYMAP_ENABLE=no | 15 | DYNAMIC_KEYMAP_ENABLE=no |
| 16 | BOOTMAGIC_ENABLE=full | 16 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite |
diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index f151bde68..cdb01a974 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h | |||
| @@ -92,6 +92,7 @@ enum layers { | |||
| 92 | #define MLT_E LT(_NUM, KC_E) | 92 | #define MLT_E LT(_NUM, KC_E) |
| 93 | 93 | ||
| 94 | #ifndef SWAP_HANDS_ENABLE | 94 | #ifndef SWAP_HANDS_ENABLE |
| 95 | #undef SH_T | ||
| 95 | #define SH_T | 96 | #define SH_T |
| 96 | #endif | 97 | #endif |
| 97 | 98 | ||
diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h index 2a8c1e943..004f58ab5 100644 --- a/users/tominabox1/config.h +++ b/users/tominabox1/config.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | // RGB_Matrix settings | 31 | // RGB_Matrix settings |
| 32 | #ifdef RGB_MATRIX_ENABLE | 32 | #ifdef RGB_MATRIX_ENABLE |
| 33 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses | 33 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses |
| 34 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | 34 | #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended |
| 35 | #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) | 35 | #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) |
| 36 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. | 36 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. |
| 37 | #define RGB_MATRIX_HUE_STEP 8 | 37 | #define RGB_MATRIX_HUE_STEP 8 |
diff --git a/users/tominabox1/rules.mk b/users/tominabox1/rules.mk index 22b6a858f..160dcce7b 100644 --- a/users/tominabox1/rules.mk +++ b/users/tominabox1/rules.mk | |||
| @@ -5,13 +5,14 @@ | |||
| 5 | CONSOLE_ENABLE = no | 5 | CONSOLE_ENABLE = no |
| 6 | TAP_DANCE_ENABLE = yes | 6 | TAP_DANCE_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 7 | NKRO_ENABLE = yes |
| 8 | BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration | 8 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite |
| 9 | 9 | ||
| 10 | ifeq ($(strip $(KEYBOARD)), crkbd/rev1) | 10 | ifeq ($(strip $(KEYBOARD)), crkbd/rev1) |
| 11 | RGB_MATRIX_ENABLE = yes | 11 | RGB_MATRIX_ENABLE = yes |
| 12 | EXTRAFLAGS += -flto | 12 | EXTRAFLAGS += -flto |
| 13 | BOOTLOADER = qmk-dfu | 13 | BOOTLOADER = qmk-dfu |
| 14 | OLED_DRIVER_ENABLE = yes | 14 | OLED_ENABLE = yes |
| 15 | OLED_DRIVER = SSD1306 | ||
| 15 | endif | 16 | endif |
| 16 | 17 | ||
| 17 | ifeq ($(strip $(KEYBOARD)), lazydesigners/dimple) | 18 | ifeq ($(strip $(KEYBOARD)), lazydesigners/dimple) |
diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c index d2e9e1258..e48959be9 100644 --- a/users/tominabox1/tominabox1.c +++ b/users/tominabox1/tominabox1.c | |||
| @@ -126,7 +126,7 @@ layer_state_t layer_state_set_keymap (layer_state_t state) { | |||
| 126 | return state; | 126 | return state; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | uint32_t layer_state_set_user(uint32_t state) { | 129 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 130 | state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | 130 | state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); |
| 131 | switch (biton32(state)) { | 131 | switch (biton32(state)) { |
| 132 | case _LOWER: | 132 | case _LOWER: |
| @@ -172,10 +172,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 172 | #endif | 172 | #endif |
| 173 | 173 | ||
| 174 | if (record->event.pressed) { | 174 | if (record->event.pressed) { |
| 175 | #ifdef OLED_DRIVER_ENABLE | 175 | #ifdef OLED_ENABLE |
| 176 | oled_timer = timer_read(); | 176 | oled_timer = timer_read(); |
| 177 | oled_on(); | 177 | oled_on(); |
| 178 | #endif // OLED_DRIVER_ENABLE | 178 | #endif // OLED_ENABLE |
| 179 | switch (keycode) { | 179 | switch (keycode) { |
| 180 | case KC_BBB: | 180 | case KC_BBB: |
| 181 | if (record->event.pressed) { | 181 | if (record->event.pressed) { |
| @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 193 | 193 | ||
| 194 | } | 194 | } |
| 195 | #ifdef KEYBOARD_crkbd_rev1 | 195 | #ifdef KEYBOARD_crkbd_rev1 |
| 196 | #ifdef OLED_DRIVER_ENABLE | 196 | #ifdef OLED_ENABLE |
| 197 | void render_logo(void) { | 197 | void render_logo(void) { |
| 198 | static const char PROGMEM logo[] = { | 198 | static const char PROGMEM logo[] = { |
| 199 | 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, | 199 | 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/turbomech/backupturbomech.c b/users/turbomech/backupturbomech.c index 2815aa452..aaea05df9 100644 --- a/users/turbomech/backupturbomech.c +++ b/users/turbomech/backupturbomech.c | |||
| @@ -296,7 +296,7 @@ case RGB_MODE_GRADIENT: | |||
| 296 | 296 | ||
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | uint32_t layer_state_set_user(uint32_t state) { | 299 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 300 | #ifdef RGBLIGHT_ENABLE | 300 | #ifdef RGBLIGHT_ENABLE |
| 301 | uint8_t default_layer = eeconfig_read_default_layer(); | 301 | uint8_t default_layer = eeconfig_read_default_layer(); |
| 302 | if (rgb_layer_change) { | 302 | if (rgb_layer_change) { |
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index b6a4e5cfa..47996110b 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #endif | 6 | #endif |
| 7 | 7 | ||
| 8 | #ifdef TRILAYER_ENABLED | 8 | #ifdef TRILAYER_ENABLED |
| 9 | uint32_t layer_state_set_user(uint32_t state) | 9 | layer_state_t layer_state_set_user(layer_state_t state) |
| 10 | { | 10 | { |
| 11 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | 11 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); |
| 12 | } | 12 | } |
diff --git a/users/xulkal/rules.mk b/users/xulkal/rules.mk index 8f8365ea7..7094191f2 100644 --- a/users/xulkal/rules.mk +++ b/users/xulkal/rules.mk | |||
| @@ -27,6 +27,6 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | |||
| 27 | SRC += custom_rgb.c | 27 | SRC += custom_rgb.c |
| 28 | endif | 28 | endif |
| 29 | 29 | ||
| 30 | ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) | 30 | ifeq ($(strip $(OLED_ENABLE)), yes) |
| 31 | SRC += custom_oled.c | 31 | SRC += custom_oled.c |
| 32 | endif | 32 | endif |
diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index 467adceef..631dda4fb 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | BOOTMAGIC_ENABLE = lite | 1 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite |
| 2 | DYNAMIC_KEYMAP_ENABLE = no | 2 | DYNAMIC_KEYMAP_ENABLE = no |
| 3 | LTO_ENABLE = yes | 3 | LTO_ENABLE = yes |
| 4 | AUDIO_ENABLE = no | 4 | AUDIO_ENABLE = no |
