atomic.c 684 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "atomic.h"
  2. __attribute__ ((weak))
  3. void * matrix_init_user(void) {
  4. // leave these blank
  5. };
  6. __attribute__ ((weak))
  7. void * matrix_scan_user(void) {
  8. // leave these blank
  9. };
  10. void * matrix_init_kb(void) {
  11. // put your keyboard start-up code here
  12. // runs once when the firmware starts up
  13. MCUCR |= (1<<JTD);
  14. MCUCR |= (1<<JTD);
  15. #ifdef BACKLIGHT_ENABLE
  16. backlight_init_ports();
  17. #endif
  18. // Turn status LED on
  19. DDRE |= (1<<6);
  20. PORTE |= (1<<6);
  21. if (matrix_init_user) {
  22. (*matrix_init_user)();
  23. }
  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. };