summaryrefslogtreecommitdiff
path: root/tmk_core/common/host.c
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-11-06 11:42:16 +1100
committerJoel Challis <git@zvecr.com>2019-11-06 00:42:16 +0000
commitdfb78d2a086daa2ceb3fd043afce03785abfa23a (patch)
tree7cd724b1cd12a65025bbc9d3cb32d7dd39cb9928 /tmk_core/common/host.c
parented0575fc8aacdfdd83a31fc98df2b1cad2e977f4 (diff)
New and improved lock LED callbacks (#7215)
* New and improved lock LED callbacks * Include stdbool * Update documentation * Use full function signatures and add keyboard-level example
Diffstat (limited to 'tmk_core/common/host.c')
-rw-r--r--tmk_core/common/host.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c
index ce39760a5b..713b0d9456 100644
--- a/tmk_core/common/host.c
+++ b/tmk_core/common/host.c
@@ -39,6 +39,12 @@ uint8_t host_keyboard_leds(void) {
if (!driver) return 0;
return (*driver->keyboard_leds)();
}
+
+led_t host_keyboard_led_state(void) {
+ if (!driver) return (led_t) {0};
+ return (led_t)((*driver->keyboard_leds)());
+}
+
/* send report */
void host_keyboard_send(report_keyboard_t *report) {
if (!driver) return;