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.

28 lines
605 B

  1. #include "acr60.h"
  2. #include "led.h"
  3. void matrix_init_kb(void) {
  4. // Keyboard start-up code goes here
  5. // Runs once when the firmware starts up
  6. matrix_init_user();
  7. led_init_ports();
  8. };
  9. void matrix_scan_kb(void) {
  10. // Looping keyboard code goes here
  11. // This runs every cycle (a lot)
  12. matrix_scan_user();
  13. };
  14. void led_init_ports(void) {
  15. // Set caps lock LED pin as output
  16. DDRB |= (1 << 2);
  17. // Default to off
  18. PORTB |= (1 << 2);
  19. }
  20. void led_set_kb(uint8_t usb_led) {
  21. // Code for caps lock LED as reported by the OS
  22. // Set this per keymap, instead of globally
  23. led_set_user(usb_led);
  24. }