summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/usb_device_state.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2024-02-28 21:47:37 +1100
committerNick Brassel <nick@tzarc.org>2024-02-28 21:47:37 +1100
commit4e369d405af6bba1adce6337b2e1b1ea1788566c (patch)
treeb0f020feff1809e37c9e7795d344929ff0bb290a /tmk_core/protocol/usb_device_state.c
parent4e04da397ef643f8fcf4afbe1d19f63aee1fc561 (diff)
parentdd1706e468bb18dd7f7ae143de735a5d3be1bfb8 (diff)
Merge branch 'develop'
Diffstat (limited to 'tmk_core/protocol/usb_device_state.c')
-rw-r--r--tmk_core/protocol/usb_device_state.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tmk_core/protocol/usb_device_state.c b/tmk_core/protocol/usb_device_state.c
index 8d56ba4d2f..4cd241528d 100644
--- a/tmk_core/protocol/usb_device_state.c
+++ b/tmk_core/protocol/usb_device_state.c
@@ -20,6 +20,10 @@
# include "haptic.h"
#endif
+#ifdef OS_DETECTION_ENABLE
+# include "os_detection.h"
+#endif
+
enum usb_device_state usb_device_state = USB_DEVICE_STATE_NO_INIT;
__attribute__((weak)) void notify_usb_device_state_change_kb(enum usb_device_state usb_device_state) {
@@ -32,7 +36,12 @@ static void notify_usb_device_state_change(enum usb_device_state usb_device_stat
#if defined(HAPTIC_ENABLE) && HAPTIC_OFF_IN_LOW_POWER
haptic_notify_usb_device_state_change();
#endif
+
notify_usb_device_state_change_kb(usb_device_state);
+
+#ifdef OS_DETECTION_ENABLE
+ os_detection_notify_usb_device_state_change(usb_device_state);
+#endif
}
void usb_device_state_set_configuration(bool isConfigured, uint8_t configurationNumber) {