You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
443 B

  1. #include <stdio.h>
  2. #include "claw44.h"
  3. char host_led_state_str[24];
  4. const char *read_host_led_state(void)
  5. {
  6. uint8_t leds = host_keyboard_leds();
  7. snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
  8. (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
  9. (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
  10. (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- ");
  11. return host_led_state_str;
  12. }