preonic.c 499 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include "preonic.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. #ifdef RGBLIGHT_ENABLE
  13. rgblight_init();
  14. #endif
  15. // Turn status LED on
  16. DDRE |= (1<<6);
  17. PORTE |= (1<<6);
  18. if (matrix_init_user) {
  19. (*matrix_init_user)();
  20. }
  21. };
  22. void * matrix_scan_kb(void) {
  23. if (matrix_scan_user) {
  24. (*matrix_scan_user)();
  25. }
  26. };