_example_avr.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. 2017 Jack Humbert
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #include "_example_avr.h"
  16. void matrix_init_kb(void) {
  17. // put your keyboard start-up code here
  18. // runs once when the firmware starts up
  19. // keep this line at the end of the function
  20. matrix_init_user();
  21. }
  22. void matrix_scan_kb(void) {
  23. // put your looping keyboard code here
  24. // runs every cycle (a lot)
  25. // keep this line at the end of the function
  26. matrix_scan_user();
  27. }
  28. bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  29. // put your per-action keyboard code here
  30. // runs for every action, just before processing by the firmware
  31. // keep this line at the end of the function
  32. return process_record_user(keycode, record);
  33. }
  34. void led_set_kb(uint8_t usb_led) {
  35. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  36. // keep this line at the end of the function
  37. led_set_user(usb_led);
  38. }