]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/host.h
Added VIA Configurator support to Snagpad (#4890)
[qmk_firmware.git] / tmk_core / common / host.h
index aeabba7107133090dcc1699044e45d7d5335272d..e70bb68533d701a7c41f99012a2cf33bc4038b46 100644 (file)
@@ -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