planck.c 444 B

12345678910111213141516171819202122232425262728293031
  1. #include "planck.h"
  2. __attribute__ ((weak))
  3. void * matrix_init_user(void) {
  4. };
  5. __attribute__ ((weak))
  6. void * matrix_scan_user(void) {
  7. };
  8. void * matrix_init_kb(void) {
  9. #ifdef BACKLIGHT_ENABLE
  10. backlight_init_ports();
  11. #endif
  12. // Turn status LED on
  13. DDRE |= (1<<6);
  14. PORTE |= (1<<6);
  15. if (matrix_init_user) {
  16. (*matrix_init_user)();
  17. }
  18. };
  19. void * matrix_scan_kb(void) {
  20. if (matrix_scan_user) {
  21. (*matrix_scan_user)();
  22. }
  23. };