2017-05-07 13:56:27 -07:00
|
|
|
#include "dk60.h"
|
|
|
|
|
2017-05-30 13:13:34 -07:00
|
|
|
void dk60_blink_all_leds(void)
|
|
|
|
{
|
|
|
|
dk60_led_all_off();
|
|
|
|
dk60_led_all_on();
|
|
|
|
_delay_ms(500);
|
|
|
|
dk60_led_all_off();
|
|
|
|
}
|
|
|
|
|
|
|
|
void matrix_init_kb(void) {
|
|
|
|
led_init_ports();
|
|
|
|
dk60_blink_all_leds();
|
|
|
|
|
|
|
|
matrix_init_user();
|
|
|
|
}
|
|
|
|
|
|
|
|
void led_init_ports(void) {
|
|
|
|
// * Set our LED pins as output
|
|
|
|
DDRE |= (1<<6);
|
|
|
|
DDRF |= (1<<0);
|
|
|
|
}
|
2017-05-07 13:56:27 -07:00
|
|
|
|
2017-05-30 13:13:34 -07:00
|
|
|
void led_set_kb(uint8_t usb_led) {
|
|
|
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
|
|
|
// Turn capslock on
|
2017-05-07 13:56:27 -07:00
|
|
|
dk60_caps_led_on();
|
2017-05-30 13:13:34 -07:00
|
|
|
} else {
|
|
|
|
// Turn capslock off
|
2017-05-07 13:56:27 -07:00
|
|
|
dk60_caps_led_off();
|
2017-05-30 13:13:34 -07:00
|
|
|
}
|
2017-05-07 13:56:27 -07:00
|
|
|
|
|
|
|
led_set_user(usb_led);
|
2017-05-30 07:59:56 -07:00
|
|
|
}
|