yd60mq.c 593 B

123456789101112131415161718192021
  1. #include "yd60mq.h"
  2. __attribute__((weak))
  3. void matrix_init_kb(void){
  4. setPinOutput(F4);
  5. writePinHigh(F4);
  6. }
  7. __attribute__((weak))
  8. bool led_update_kb(led_t led_state) {
  9. bool res = led_update_user(led_state);
  10. if (res) {
  11. // writePin sets the pin high for 1 and low for 0.
  12. // In this example the pins are inverted, setting
  13. // it low/0 turns it on, and high/1 turns the LED off.
  14. // This behavior depends on whether the LED is between the pin
  15. // and VCC or the pin and GND.
  16. writePin(F4, !led_state.caps_lock);
  17. }
  18. return res;
  19. }