aboutsummaryrefslogtreecommitdiff
path: root/keyboards/infinity60/keymaps/jpetermans/keymap.c
diff options
context:
space:
mode:
authorjpetermans <tibcmhhm@gmail.com>2017-04-10 22:23:45 -0700
committerjpetermans <tibcmhhm@gmail.com>2017-04-10 22:23:45 -0700
commitd8e9c183bef146bc4b42c7f15d5c44c7abd5118f (patch)
tree62f7d3a6d2b8df2eb4843a35a34108e950c8c38e /keyboards/infinity60/keymaps/jpetermans/keymap.c
parentdda858c437e2fd0336f070ccb5d1f6e412815d9a (diff)
downloadqmk_firmware-d8e9c183bef146bc4b42c7f15d5c44c7abd5118f.tar.gz
qmk_firmware-d8e9c183bef146bc4b42c7f15d5c44c7abd5118f.zip
led init code missing pwm writes for Frame 1
Diffstat (limited to 'keyboards/infinity60/keymaps/jpetermans/keymap.c')
-rw-r--r--keyboards/infinity60/keymaps/jpetermans/keymap.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c
index cfc288916..87a1afc3e 100644
--- a/keyboards/infinity60/keymaps/jpetermans/keymap.c
+++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c
@@ -62,7 +62,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62 _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,\ 62 _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,\
63 _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,\ 63 _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,\
64 _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______, \ 64 _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______, \
65 _______,_______,F(2),F(3),F(4),_______,_______, _______, KC_MPRV, KC_MNXT,KC_MSTP, _______,KC_NO, \ 65 _______,_______,F(2),F(3),F(4),F(5),F(6),F(7), KC_MPRV, KC_MNXT,KC_MSTP, _______,KC_NO, \
66 _______,_______,_______, KC_MPLY, _______,_______, _______,_______ \ 66 _______,_______,_______, KC_MPLY, _______,_______, _______,_______ \
67 ), 67 ),
68 /* ~ */ 68 /* ~ */
@@ -91,7 +91,9 @@ enum function_id {
91enum macro_id { 91enum macro_id {
92 ACTION_LEDS_ALL, 92 ACTION_LEDS_ALL,
93 ACTION_LEDS_GAME, 93 ACTION_LEDS_GAME,
94 ACTION_LED_1 94 ACTION_LEDS_NAV,
95 ACTION_LEDS_MEDIA,
96 ACTION_LEDS_NUMPAD
95}; 97};
96 98
97/* ================================== 99/* ==================================
@@ -170,7 +172,9 @@ const uint16_t fn_actions[] = {
170 [1] = ACTION_LAYER_MODS(_TILDE, MOD_LSFT), 172 [1] = ACTION_LAYER_MODS(_TILDE, MOD_LSFT),
171 [2] = ACTION_FUNCTION(ACTION_LEDS_ALL), 173 [2] = ACTION_FUNCTION(ACTION_LEDS_ALL),
172 [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), 174 [3] = ACTION_FUNCTION(ACTION_LEDS_GAME),
173 [4] = ACTION_FUNCTION(ACTION_LED_1) 175 [4] = ACTION_FUNCTION(ACTION_LEDS_MEDIA),
176 [5] = ACTION_FUNCTION(ACTION_LEDS_NAV),
177 [6] = ACTION_FUNCTION(ACTION_LEDS_NUMPAD)
174 178
175}; 179};
176 180
@@ -182,23 +186,35 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
182 case ACTION_LEDS_ALL: 186 case ACTION_LEDS_ALL:
183 if(record->event.pressed) { 187 if(record->event.pressed) {
184 // signal the LED controller thread 188 // signal the LED controller thread
185 msg=(TOGGLE_LED << 8) | 12; 189 msg=(TOGGLE_ALL << 8) | 0;
186 chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); 190 chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
187 } 191 }
188 break; 192 break;
189 case ACTION_LEDS_GAME: 193 case ACTION_LEDS_GAME:
190 if(record->event.pressed) { 194 if(record->event.pressed) {
191 // signal the LED controller thread 195 // signal the LED controller thread
192 msg=(TOGGLE_LAYER_LEDS << 8) | 5; 196 msg=(TOGGLE_LED << 8) | 11;
193 chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); 197 chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
194 } 198 }
195 break; 199 break;
196 case ACTION_LED_1: 200 case ACTION_LEDS_NAV:
197 if(record->event.pressed) { 201 if(record->event.pressed) {
198 // signal the LED controller thread 202 // signal the LED controller thread
199 chMBPost(&led_mailbox, ADDR_LED_1, TIME_IMMEDIATE); 203 msg=(TOGGLE_LAYER_LEDS << 8) | 3;
204 chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
205 }
206 case ACTION_LEDS_NUMPAD:
207 if(record->event.pressed) {
208 // signal the LED controller thread
209 msg=(TOGGLE_LAYER_LEDS << 8) | 4;
210 chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
211 }
212 case ACTION_LEDS_MEDIA:
213 if(record->event.pressed) {
214 // signal the LED controller thread
215 msg=(TOGGLE_LAYER_LEDS << 8) | 5;
216 chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
200 } 217 }
201 break;
202 } 218 }
203} 219}
204 220