2018-08-22 18:51:37 +02:00
|
|
|
#include <stdio.h>
|
2024-04-05 05:48:21 +02:00
|
|
|
#include "led.h"
|
|
|
|
#include "host.h"
|
2018-06-09 00:28:28 +02:00
|
|
|
|
2018-08-22 18:51:37 +02:00
|
|
|
char host_led_state_str[24];
|
2018-06-09 00:28:28 +02:00
|
|
|
|
2018-08-22 18:51:37 +02:00
|
|
|
const char *read_host_led_state(void)
|
2018-06-09 00:28:28 +02:00
|
|
|
{
|
2023-07-02 20:24:22 +02:00
|
|
|
led_t led_state = host_keyboard_led_state();
|
2018-08-22 18:51:37 +02:00
|
|
|
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
|
2023-07-02 20:24:22 +02:00
|
|
|
(led_state.num_lock) ? "on" : "- ",
|
|
|
|
(led_state.caps_lock) ? "on" : "- ",
|
|
|
|
(led_state.scroll_lock) ? "on" : "- ");
|
2018-06-09 00:28:28 +02:00
|
|
|
|
2018-08-22 18:51:37 +02:00
|
|
|
return host_led_state_str;
|
2018-06-09 00:28:28 +02:00
|
|
|
}
|