opensteno_qmk/keyboards/lily58/lib/host_led_state_reader.c

17 lines
445 B
C
Raw Normal View History

#include <stdio.h>
2020-05-30 20:14:59 +00:00
#include "led.h"
#include "host.h"
#include "lily58.h"
char host_led_state_str[24];
const char *read_host_led_state(void)
{
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
2020-05-30 20:14:59 +00:00
(IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "on" : "- ",
(IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "on" : "- ",
(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "on" : "- ");
return host_led_state_str;
}