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.

61 lines
1.4 KiB

  1. #include "traveller.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 process_action_user(keyrecord_t *record) {
  12. // leave this function blank - it can be defined in a keymap file
  13. }
  14. __attribute__ ((weak))
  15. void led_set_user(uint8_t usb_led) {
  16. // leave this function blank - it can be defined in a keymap file
  17. }
  18. void matrix_init_kb(void) {
  19. // put your keyboard start-up code here
  20. // runs once when the firmware starts up
  21. #ifdef RGBLIGHT_ENABLE
  22. rgblight_init();
  23. rgblight_mode(1); // solid, no timer
  24. rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW
  25. #endif
  26. // Turn status LED on
  27. DDRC |= (1<<7);
  28. PORTC |= (1<<7);
  29. matrix_init_user();
  30. }
  31. void matrix_scan_kb(void) {
  32. // put your looping keyboard code here
  33. // runs every cycle (a lot)
  34. matrix_scan_user();
  35. }
  36. bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  37. // put your per-action keyboard code here
  38. // runs for every action, just before processing by the firmware
  39. return process_record_user(keycode, record);
  40. }
  41. void led_set_kb(uint8_t usb_led) {
  42. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  43. led_set_user(usb_led);
  44. }