retro_refit.c 604 B

123456789101112131415161718192021222324
  1. #include "quantum.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. // Disable status LED on KB, enable status LED on Teensy (KB_STATUS = !TEENSY_STATUS)
  7. gpio_set_pin_output(D6);
  8. gpio_write_pin_high(D6);
  9. matrix_init_user();
  10. };
  11. bool led_update_kb(led_t led_state) {
  12. bool res = led_update_user(led_state);
  13. if(res) {
  14. gpio_write_pin(D0, !led_state.caps_lock);
  15. gpio_write_pin(D1, !led_state.num_lock);
  16. gpio_write_pin(C6, !led_state.scroll_lock);
  17. }
  18. return res;
  19. }