diff options
author | jpetermans <tibcmhhm@gmail.com> | 2017-04-11 23:33:48 -0700 |
---|---|---|
committer | jpetermans <tibcmhhm@gmail.com> | 2017-04-11 23:33:48 -0700 |
commit | 0881f2dbfa6887347afad577def01c246050df61 (patch) | |
tree | cc8163a5e0cd5f82ceff348c8534802e8b008a21 /keyboards/infinity60/keymaps/jpetermans/keymap.c | |
parent | d8e9c183bef146bc4b42c7f15d5c44c7abd5118f (diff) |
fixed write_led_page col shift, added option for lock led display
Diffstat (limited to 'keyboards/infinity60/keymaps/jpetermans/keymap.c')
-rw-r--r-- | keyboards/infinity60/keymaps/jpetermans/keymap.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c index 87a1afc3e5..2eb66b506f 100644 --- a/keyboards/infinity60/keymaps/jpetermans/keymap.c +++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c @@ -93,7 +93,8 @@ enum macro_id { ACTION_LEDS_GAME, ACTION_LEDS_NAV, ACTION_LEDS_MEDIA, - ACTION_LEDS_NUMPAD + ACTION_LEDS_NUMPAD, + ACTION_LEDS_TEST }; /* ================================== @@ -174,7 +175,9 @@ const uint16_t fn_actions[] = { [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), [4] = ACTION_FUNCTION(ACTION_LEDS_MEDIA), [5] = ACTION_FUNCTION(ACTION_LEDS_NAV), - [6] = ACTION_FUNCTION(ACTION_LEDS_NUMPAD) + [6] = ACTION_FUNCTION(ACTION_LEDS_NUMPAD), + [7] = ACTION_FUNCTION(ACTION_LEDS_TEST) + }; @@ -193,7 +196,14 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { case ACTION_LEDS_GAME: if(record->event.pressed) { // signal the LED controller thread - msg=(TOGGLE_LED << 8) | 11; + msg=(TOGGLE_LAYER_LEDS << 8) | 6; + chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); + } + break; + case ACTION_LEDS_MEDIA: + if(record->event.pressed) { + // signal the LED controller thread + msg=(TOGGLE_LAYER_LEDS << 8) | 5; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } break; @@ -203,18 +213,21 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { msg=(TOGGLE_LAYER_LEDS << 8) | 3; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } + break; case ACTION_LEDS_NUMPAD: if(record->event.pressed) { // signal the LED controller thread msg=(TOGGLE_LAYER_LEDS << 8) | 4; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } - case ACTION_LEDS_MEDIA: + break; + case ACTION_LEDS_TEST: if(record->event.pressed) { // signal the LED controller thread - msg=(TOGGLE_LAYER_LEDS << 8) | 5; + msg=(TOGGLE_LED << 8) | 12; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } + break; } } @@ -236,6 +249,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // Runs just one time when the keyboard initializes. void matrix_init_user(void) { + xprintf("init start"); led_controller_init(); |