diff options
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/protocol/usb_device_state.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tmk_core/protocol/usb_device_state.c b/tmk_core/protocol/usb_device_state.c index 5ccd309ec..84f01943b 100644 --- a/tmk_core/protocol/usb_device_state.c +++ b/tmk_core/protocol/usb_device_state.c | |||
| @@ -16,6 +16,9 @@ | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "usb_device_state.h" | 18 | #include "usb_device_state.h" |
| 19 | #if defined(HAPTIC_ENABLE) | ||
| 20 | # include "haptic.h" | ||
| 21 | #endif | ||
| 19 | 22 | ||
| 20 | enum usb_device_state usb_device_state = USB_DEVICE_STATE_NO_INIT; | 23 | enum usb_device_state usb_device_state = USB_DEVICE_STATE_NO_INIT; |
| 21 | 24 | ||
| @@ -23,7 +26,12 @@ __attribute__((weak)) void notify_usb_device_state_change_kb(enum usb_device_sta | |||
| 23 | 26 | ||
| 24 | __attribute__((weak)) void notify_usb_device_state_change_user(enum usb_device_state usb_device_state) {} | 27 | __attribute__((weak)) void notify_usb_device_state_change_user(enum usb_device_state usb_device_state) {} |
| 25 | 28 | ||
| 26 | static void notify_usb_device_state_change(enum usb_device_state usb_device_state) { notify_usb_device_state_change_kb(usb_device_state); } | 29 | static void notify_usb_device_state_change(enum usb_device_state usb_device_state) { |
| 30 | #if defined(HAPTIC_ENABLE) && HAPTIC_OFF_IN_LOW_POWER | ||
| 31 | haptic_notify_usb_device_state_change(); | ||
| 32 | #endif | ||
| 33 | notify_usb_device_state_change_kb(usb_device_state); | ||
| 34 | } | ||
| 27 | 35 | ||
| 28 | void usb_device_state_set_configuration(bool isConfigured, uint8_t configurationNumber) { | 36 | void usb_device_state_set_configuration(bool isConfigured, uint8_t configurationNumber) { |
| 29 | usb_device_state = isConfigured ? USB_DEVICE_STATE_CONFIGURED : USB_DEVICE_STATE_INIT; | 37 | usb_device_state = isConfigured ? USB_DEVICE_STATE_CONFIGURED : USB_DEVICE_STATE_INIT; |
