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.

47 lines
996 B

  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. return NULL;
  6. };
  7. __attribute__ ((weak))
  8. void * matrix_scan_user(void) {
  9. // leave this function blank - it can be defined in a keymap file
  10. return NULL;
  11. };
  12. __attribute__ ((weak))
  13. void * led_set_user(uint8_t usb_led) {
  14. // leave this function blank - it can be defined in a keymap file
  15. return NULL;
  16. };
  17. void * matrix_init_kb(void) {
  18. // put your keyboard start-up code here
  19. // runs once when the firmware starts up
  20. if (matrix_init_user) {
  21. (*matrix_init_user)();
  22. }
  23. return NULL;
  24. };
  25. void * matrix_scan_kb(void) {
  26. // put your looping keyboard code here
  27. // runs every cycle (a lot)
  28. if (matrix_scan_user) {
  29. (*matrix_scan_user)();
  30. }
  31. return NULL;
  32. };
  33. void * led_set_kb(uint8_t usb_led) {
  34. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  35. if (led_set_user) {
  36. (*led_set_user)(usb_led);
  37. }
  38. return NULL;
  39. };