2
0

alice.c 542 B

123456789101112131415161718192021222324252627
  1. #include "alice.h"
  2. void matrix_init_board(void){
  3. setPinOutput(A0);
  4. setPinOutput(A1);
  5. setPinOutput(A2);
  6. }
  7. void led_set_kb(uint8_t usb_led) {
  8. if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
  9. writePinLow(A0);
  10. } else {
  11. writePinHigh(A0);
  12. }
  13. if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
  14. writePinLow(A1);
  15. } else {
  16. writePinHigh(A1);
  17. }
  18. if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
  19. writePinLow(A2);
  20. } else {
  21. writePinHigh(A2);
  22. }
  23. led_set_user(usb_led);
  24. }