Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sleep_led.c 470B

1234567891011121314151617181920212223
  1. #include "ch.h"
  2. #include "led.h"
  3. #include "sleep_led.h"
  4. void sleep_led_init(void) {
  5. // we could go the 'software way' -- just enable *some* timer
  6. // and go with callbacks
  7. // or we could go the 'hardware way' -- and use timer output to
  8. // pins directly
  9. }
  10. void sleep_led_enable(void) {
  11. led_set(1<<USB_LED_CAPS_LOCK);
  12. }
  13. void sleep_led_disable(void) {
  14. led_set(0);
  15. }
  16. void sleep_led_toggle(void) {
  17. // not working yet, state not saved anywhere currently
  18. }