diff options
Diffstat (limited to 'led.c')
-rw-r--r-- | led.c | 23 |
1 files changed, 9 insertions, 14 deletions
@@ -40,33 +40,28 @@ void led_set(uint8_t usb_led) else PORTD |= (1 << PD3); - /* - * 1st LED on first row (G00). - * - * NOTE: This will automatically disable PWM mode, so it will not - * interfere with timer 0 and tmk's timer module. - */ - pwm_pd0_set_led(usb_led & (1 << USB_LED_NUM_LOCK) ? 255 : 0); + /* 1st LED on first row (G00). */ + pwm_pb5_set_led(usb_led & (1 << USB_LED_NUM_LOCK) ? 255 : 0); /* 2nd LED on first row (G01): Highlight keyclick mode. */ - pwm_pb7_set_led(keyclick_mode*255/(KEYCLICK_MAX-1)); + pwm_pd1_set_led(keyclick_mode*255/(KEYCLICK_MAX-1)); /* 3rd LED on the first row (G02) */ - pwm_pd1_set_led(usb_led & (1 << USB_LED_COMPOSE) ? 255 : 0); + pwm_pb7_set_led(usb_led & (1 << USB_LED_COMPOSE) ? 255 : 0); /* * 4th LED (G03) are currently not triggerable via USB. * Could be triggered as the "backlight". */ - pwm_pb6_set_led(0); + pwm_pb4_set_led(0); /* 5th LED on the first row (G04) */ - pwm_pb4_set_led(usb_led & (1 << USB_LED_SCROLL_LOCK) ? 255 : 0); + pwm_pb6_set_led(usb_led & (1 << USB_LED_SCROLL_LOCK) ? 255 : 0); /* * 6th LED on the first row (G53). * - * Triggering this LED (PD2) will also enable the buzzer (PB5), + * Triggering this LED (PD2) will also enable the buzzer (PD0), * so we have got a way to beep from userspace (see ./k7637-beep.sh). * * The original firmware also had the error display on G53 @@ -74,9 +69,9 @@ void led_set(uint8_t usb_led) */ if (usb_led & (1 << USB_LED_KANA)) { PORTD &= ~(1 << PD2); - pwm_pb5_set_tone(2200); + pwm_pd0_set_tone(2200); } else { PORTD |= (1 << PD2); - pwm_pb5_set_tone(0); + pwm_pd0_set_tone(0); } } |