template.c 803 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include "%KEYBOARD%.h"
  2. __attribute__ ((weak))
  3. void matrix_init_user(void) {
  4. // leave this function blank - it can be defined in a keymap file
  5. };
  6. __attribute__ ((weak))
  7. void matrix_scan_user(void) {
  8. // leave this function blank - it can be defined in a keymap file
  9. }
  10. __attribute__ ((weak))
  11. void led_set_user(uint8_t usb_led) {
  12. // leave this function blank - it can be defined in a keymap file
  13. }
  14. void matrix_init_kb(void) {
  15. // put your keyboard start-up code here
  16. // runs once when the firmware starts up
  17. matrix_init_user();
  18. }
  19. void matrix_scan_kb(void) {
  20. // put your looping keyboard code here
  21. // runs every cycle (a lot)
  22. matrix_scan_user();
  23. }
  24. void led_set_kb(uint8_t usb_led) {
  25. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  26. led_set_user(usb_led);
  27. }