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
This commit is contained in:
fauxpark 2019-11-06 11:42:16 +11:00 committed by Joel Challis
parent ed0575fc8a
commit dfb78d2a08
9 changed files with 142 additions and 70 deletions

View file

@ -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;