tritium_numpad.c 598 B

1234567891011121314151617181920212223242526272829
  1. #include "tritium_numpad.h"
  2. #include "led.h"
  3. void keyboard_pre_init_kb(void) {
  4. // put your keyboard start-up code here
  5. // runs once when the firmware starts up
  6. keyboard_pre_init_user();
  7. led_init_ports();
  8. };
  9. void matrix_scan_kb(void) {
  10. // put your looping keyboard code here
  11. // runs every cycle (a lot)
  12. matrix_scan_user();
  13. };
  14. void led_init_ports(void) {
  15. // * Set our LED pins as output
  16. // Numlock LED
  17. setPinOutput(D5);
  18. }
  19. void led_set_kb(uint8_t usb_led) {
  20. if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
  21. writePinLow(D5);
  22. } else {
  23. writePinHigh(D5);
  24. }
  25. }