s65_x.c 487 B

123456789101112131415161718192021222324
  1. #include "s65_x.h"
  2. #include "led.h"
  3. void matrix_init_kb(void) {
  4. // put your keyboard start-up code here
  5. // runs once when the firmware starts up
  6. matrix_init_user();
  7. };
  8. void matrix_scan_kb(void) {
  9. // put your looping keyboard code here
  10. // runs every cycle (a lot)
  11. matrix_scan_user();
  12. };
  13. void led_set_kb(uint8_t usb_led) {
  14. if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
  15. // Turn capslock on
  16. PORTB &= ~(1<<7);
  17. } else {
  18. // Turn capslock off
  19. PORTB |= (1<<7);
  20. }
  21. }