v1.c 458 B

123456789101112131415161718192021
  1. #include "v1.h"
  2. void led_set_kb(uint8_t usb_led) {
  3. #ifndef CONVERT_TO_PROTON_C
  4. /* Map RXLED to USB_LED_NUM_LOCK */
  5. if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
  6. setPinOutput(B0);
  7. writePinLow(B0);
  8. } else {
  9. setPinInput(B0);
  10. }
  11. /* Map TXLED to USB_LED_CAPS_LOCK */
  12. if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
  13. setPinOutput(D5);
  14. writePinLow(D5);
  15. } else {
  16. setPinInput(D5);
  17. }
  18. #endif
  19. }