[Core] Add OS detection callbacks (#21777)
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user