diff options
| author | stanrc85 <47038504+stanrc85@users.noreply.github.com> | 2020-07-25 06:10:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-25 03:10:00 -0700 |
| commit | 208fbce9a79ea1775a0367a0075a680b71928b1e (patch) | |
| tree | a5b012c9c6aa588678157f4e27c66b8acdf3b9d7 /users/stanrc85 | |
| parent | 21976f47d86e6ef01a2ec097ad1e36f5aada671b (diff) | |
| download | qmk_firmware-208fbce9a79ea1775a0367a0075a680b71928b1e.tar.gz qmk_firmware-208fbce9a79ea1775a0367a0075a680b71928b1e.zip | |
Keymap for OSAv2 (#9773)
* Add OSAv2 keymap
* OSAv2 configs and rules
* OSAv2 lighting layers
* OSAv2 lighting layers
* Fix colors after copy/paste
* Use LED indicators instead of RGB
Diffstat (limited to 'users/stanrc85')
| -rw-r--r-- | users/stanrc85/config.h | 1 | ||||
| -rw-r--r-- | users/stanrc85/rgblight_layers_osa.c | 50 | ||||
| -rw-r--r-- | users/stanrc85/rules.mk | 6 |
3 files changed, 56 insertions, 1 deletions
diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h index fba488e1c..71b915e48 100644 --- a/users/stanrc85/config.h +++ b/users/stanrc85/config.h | |||
| @@ -5,6 +5,5 @@ | |||
| 5 | 5 | ||
| 6 | #ifdef RGBLIGHT_ENABLE | 6 | #ifdef RGBLIGHT_ENABLE |
| 7 | #define RGBLIGHT_LAYERS | 7 | #define RGBLIGHT_LAYERS |
| 8 | #define RGBLIGHT_LIMIT_VAL 175 | ||
| 9 | #define RGBLIGHT_SLEEP | 8 | #define RGBLIGHT_SLEEP |
| 10 | #endif | 9 | #endif |
diff --git a/users/stanrc85/rgblight_layers_osa.c b/users/stanrc85/rgblight_layers_osa.c new file mode 100644 index 000000000..8bd7137e4 --- /dev/null +++ b/users/stanrc85/rgblight_layers_osa.c | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | #include "stanrc85.h" | ||
| 2 | |||
| 3 | const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 4 | {2, 2, HSV_RED}, | ||
| 5 | {6, 2, HSV_RED} | ||
| 6 | ); | ||
| 7 | |||
| 8 | const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 9 | {2, 2, HSV_GREEN}, | ||
| 10 | {6, 2, HSV_GREEN} | ||
| 11 | ); | ||
| 12 | |||
| 13 | const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 14 | {2, 2, HSV_BLUE}, | ||
| 15 | {6, 2, HSV_BLUE} | ||
| 16 | ); | ||
| 17 | |||
| 18 | const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 19 | {2, 2, HSV_WHITE}, | ||
| 20 | {6, 2, HSV_WHITE} | ||
| 21 | ); | ||
| 22 | |||
| 23 | // Now define the array of layers. Later layers take precedence | ||
| 24 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
| 25 | my_capslock_layer, | ||
| 26 | my_layer1_layer, | ||
| 27 | my_layer2_layer, | ||
| 28 | my_layer3_layer | ||
| 29 | ); | ||
| 30 | |||
| 31 | void keyboard_post_init_user(void) { | ||
| 32 | // Enable the LED layers | ||
| 33 | rgblight_layers = my_rgb_layers; | ||
| 34 | } | ||
| 35 | |||
| 36 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 37 | // Both layers will light up if both kb layers are active | ||
| 38 | rgblight_set_layer_state(1, layer_state_cmp(state, 1)); | ||
| 39 | rgblight_set_layer_state(2, layer_state_cmp(state, 2)); | ||
| 40 | rgblight_set_layer_state(3, layer_state_cmp(state, 3)); | ||
| 41 | return state; | ||
| 42 | } | ||
| 43 | |||
| 44 | bool led_update_user(led_t led_state) { | ||
| 45 | //rgblight_set_layer_state(0, led_state.caps_lock); | ||
| 46 | writePin(C7, led_state.caps_lock); | ||
| 47 | writePin(C6, led_state.num_lock); | ||
| 48 | writePin(B6, led_state.scroll_lock); | ||
| 49 | return false; | ||
| 50 | } \ No newline at end of file | ||
diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 5fa3737a2..5c572c0af 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk | |||
| @@ -31,4 +31,10 @@ ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev2) | |||
| 31 | VIA_ENABLE = yes | 31 | VIA_ENABLE = yes |
| 32 | LTO_ENABLE = no | 32 | LTO_ENABLE = no |
| 33 | VELOCIKEY_ENABLE=yes | 33 | VELOCIKEY_ENABLE=yes |
| 34 | endif | ||
| 35 | ifeq ($(strip $(KEYBOARD)), tkc/osav2) | ||
| 36 | SRC += rgblight_layers_osa.c | ||
| 37 | VIA_ENABLE = yes | ||
| 38 | LTO_ENABLE = no | ||
| 39 | VELOCIKEY_ENABLE=yes | ||
| 34 | endif \ No newline at end of file | 40 | endif \ No newline at end of file |
