Defined IS_(HOST_)LED_ON/OFF() and improved LED documentation (#4853)
* Defined IS_(HOST_)LED_ON/OFF() and improved LED documentation * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau <didierloiseau+github@gmail.com> * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau <didierloiseau+github@gmail.com> * Integrated @drashna and @fauxpark's PR comments - changed all plurals of "LED" to "LEDs" in the file - rewording of the note about host_keyboard_leds() vs. led_set_user() * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau <didierloiseau+github@gmail.com>
This commit is contained in:
parent
77399bfe51
commit
94ba2e5a9f
2 changed files with 52 additions and 8 deletions
|
@ -46,6 +46,12 @@ void host_consumer_send(uint16_t data);
|
|||
uint16_t host_last_system_report(void);
|
||||
uint16_t host_last_consumer_report(void);
|
||||
|
||||
#define IS_LED_ON(USB_LED, LED_NAME) ((USB_LED) & (1 << (LED_NAME)))
|
||||
#define IS_LED_OFF(USB_LED, LED_NAME) (~(USB_LED) & (1 << (LED_NAME)))
|
||||
|
||||
#define IS_HOST_LED_ON(LED_NAME) IS_LED_ON(host_keyboard_leds(), (LED_NAME))
|
||||
#define IS_HOST_LED_OFF(LED_NAME) IS_LED_OFF(host_keyboard_leds(), (LED_NAME))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue