From ff6beeb7a313953c589defb6af1f9ae461cba03a Mon Sep 17 00:00:00 2001 From: jpetermans Date: Sat, 29 Apr 2017 09:22:40 -0700 Subject: simplified lock led function --- keyboards/infinity60/led_controller.c | 57 ++++++++++------------------------- keyboards/infinity60/led_controller.h | 2 +- 2 files changed, 17 insertions(+), 42 deletions(-) diff --git a/keyboards/infinity60/led_controller.c b/keyboards/infinity60/led_controller.c index 4dc9b9234..707b4e0df 100644 --- a/keyboards/infinity60/led_controller.c +++ b/keyboards/infinity60/led_controller.c @@ -262,10 +262,10 @@ page_status = 0; //start frame 0 (all off/on) //maintain lock leds if (host_keyboard_leds() & (1< Date: Mon, 8 May 2017 14:55:57 -0700 Subject: minor change on lock leds --- keyboards/infinity60/led_controller.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/keyboards/infinity60/led_controller.c b/keyboards/infinity60/led_controller.c index 707b4e0df..75806d54b 100644 --- a/keyboards/infinity60/led_controller.c +++ b/keyboards/infinity60/led_controller.c @@ -317,19 +317,19 @@ page_status = 0; //start frame 0 (all off/on) case TOGGLE_NUM_LOCK: //msg_led = 0 or 1, off/on - set_lock_leds(NUM_LOCK_LED_ADDRESS, msg_led); + set_lock_leds(NUM_LOCK_LED_ADDRESS, 1); break; case TOGGLE_CAPS_LOCK: //msg_led = 0 or 1, off/on - set_lock_leds(CAPS_LOCK_LED_ADDRESS, msg_led); + set_lock_leds(CAPS_LOCK_LED_ADDRESS, 1); break; //TODO: MODE_BREATH case MODE_BREATH: break; case STEP_BRIGHTNESS: - xprintf("STEP_BACKLIGHT\n"); + xprintf("TOGGLE_BACKLIGHT\n"); chThdSleepMilliseconds(10); //led_msg = step pwm up or down switch (msg_led) { @@ -459,10 +459,8 @@ void set_led_bit (uint8_t page, uint8_t *led_control_reg, uint8_t led_addr, uint } void set_lock_leds(uint8_t led_addr, uint8_t led_action) { - uint8_t page, temp; + uint8_t page; uint8_t led_control_word[2] = {0}; - //TODO: this function call could send led address vs lock_type. - //however, the switch/case allows for additional steps, like audio, depending on type //ignore frame0 if all leds are on or if option set in led_controller.h //TODO: blink of all leds are on, clear blink register if not -- cgit v1.2.3-24-g4f1b