summaryrefslogtreecommitdiffstats
path: root/keyboards/infinity60/led_controller.c
diff options
context:
space:
mode:
authorjpetermans <tibcmhhm@gmail.com>2017-04-06 16:27:51 -0700
committerjpetermans <tibcmhhm@gmail.com>2017-04-06 16:27:51 -0700
commitaf13e9a12d64f74873e5bf429fdedcda37b3036a (patch)
tree5836346f81d5dc6fbf4ed354f968a3a02c921b54 /keyboards/infinity60/led_controller.c
parent56be3007570a3b6b2e2f78f500cea4fb22430459 (diff)
Moved led page arrays to keymap.c and added keymap header to define
individual led addresses
Diffstat (limited to 'keyboards/infinity60/led_controller.c')
-rw-r--r--keyboards/infinity60/led_controller.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/keyboards/infinity60/led_controller.c b/keyboards/infinity60/led_controller.c
index c5303a3e70..9579bc08b4 100644
--- a/keyboards/infinity60/led_controller.c
+++ b/keyboards/infinity60/led_controller.c
@@ -171,6 +171,7 @@ static THD_FUNCTION(LEDthread, arg) {
// process 'msg' here
switch(msg) {
+//TODO: make this generic and able to turn on/off any address and loop through all(or current) pages
case LED_MSG_CAPS_ON:
// turn caps on on pages 1 and 2
is31_write_register(0, CAPS_LOCK_LED_ADDRESS, 0xFF);
@@ -238,48 +239,6 @@ static THD_FUNCTION(LEDthread, arg) {
}
}
-//These relate to the LED map above, row and column
-//0x24 = first byte (CA1) of PWM page, 0x34 is 17th byte (CA2)
-/* LED game mode */
-const uint8_t led_game[72] = {
- 0x24,
- 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x34,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x44,
- 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x54,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
- 0x64,
- 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x74,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x84,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x94,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* ALL LEDs */
-const uint8_t led_all[72] = {
- 0x24,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x34,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-0x44,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x54,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x64,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x74,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x84,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x94,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-};
-
/* =============
* hook into TMK
* ============= */
@@ -315,14 +274,6 @@ void led_controller_init(void) {
is31_write_register(IS31_FUNCTIONREG, IS31_REG_BREATHCTRL1, (3<<4)|3);
is31_write_register(IS31_FUNCTIONREG, IS31_REG_BREATHCTRL2, IS31_REG_BREATHCTRL2_ENABLE|3);
- /* Write pages */
- for(i=0; i<8; i++) {
- is31_write_data(1,(uint8_t *)(led_game+(9*i)),9);
- chThdSleepMilliseconds(5);
- is31_write_data(2,(uint8_t *)(led_all+(9*i)),9);
- chThdSleepMilliseconds(5);
- }
-
// clean up the capslock LED
is31_write_register(1, CAPS_LOCK_LED_ADDRESS, 0);
is31_write_register(2, CAPS_LOCK_LED_ADDRESS, 0);