2019-01-05 17:30:48 +00:00
|
|
|
#include <stdio.h>
|
2020-05-30 20:14:59 +00:00
|
|
|
#include "led.h"
|
|
|
|
#include "host.h"
|
2019-01-05 17:30:48 +00:00
|
|
|
#include "lily58.h"
|
|
|
|
|
|
|
|
char host_led_state_str[24];
|
|
|
|
|
|
|
|
const char *read_host_led_state(void)
|
|
|
|
{
|
2023-02-06 02:36:09 +00:00
|
|
|
led_t led_state = host_keyboard_led_state();
|
2019-01-05 17:30:48 +00:00
|
|
|
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
|
2023-02-06 02:36:09 +00:00
|
|
|
led_state.num_lock ? "on" : "- ",
|
|
|
|
led_state.caps_lock ? "on" : "- ",
|
|
|
|
led_state.scroll_lock ? "on" : "- ");
|
2019-01-05 17:30:48 +00:00
|
|
|
|
|
|
|
return host_led_state_str;
|
|
|
|
}
|