diff options
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/protocol/chibios/main.c | 4 | ||||
| -rw-r--r-- | tmk_core/protocol/chibios/usb_main.c | 21 | ||||
| -rw-r--r-- | tmk_core/protocol/chibios/usb_main.h | 3 |
3 files changed, 2 insertions, 26 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 7138b5535..47a7eb09a 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c | |||
| @@ -165,8 +165,8 @@ int main(void) { | |||
| 165 | #endif | 165 | #endif |
| 166 | suspend_power_down(); // on AVR this deep sleeps for 15ms | 166 | suspend_power_down(); // on AVR this deep sleeps for 15ms |
| 167 | /* Remote wakeup */ | 167 | /* Remote wakeup */ |
| 168 | if((USB_DRIVER.status & 2) && suspend_wakeup_condition()) { | 168 | if(suspend_wakeup_condition()) { |
| 169 | send_remote_wakeup(&USB_DRIVER); | 169 | usbWakeupHost(&USB_DRIVER); |
| 170 | } | 170 | } |
| 171 | } | 171 | } |
| 172 | /* Woken up */ | 172 | /* Woken up */ |
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 6173d3ad1..caa2770b5 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c | |||
| @@ -1036,27 +1036,6 @@ void init_usb_driver(USBDriver *usbp) { | |||
| 1036 | #endif | 1036 | #endif |
| 1037 | } | 1037 | } |
| 1038 | 1038 | ||
| 1039 | /* | ||
| 1040 | * Send remote wakeup packet | ||
| 1041 | * Note: should not be called from ISR | ||
| 1042 | */ | ||
| 1043 | void send_remote_wakeup(USBDriver *usbp) { | ||
| 1044 | (void)usbp; | ||
| 1045 | #if defined(K20x) || defined(KL2x) | ||
| 1046 | #if KINETIS_USB_USE_USB0 | ||
| 1047 | USB0->CTL |= USBx_CTL_RESUME; | ||
| 1048 | wait_ms(15); | ||
| 1049 | USB0->CTL &= ~USBx_CTL_RESUME; | ||
| 1050 | #endif /* KINETIS_USB_USE_USB0 */ | ||
| 1051 | #elif defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) /* End K20x || KL2x */ | ||
| 1052 | STM32_USB->CNTR |= CNTR_RESUME; | ||
| 1053 | wait_ms(15); | ||
| 1054 | STM32_USB->CNTR &= ~CNTR_RESUME; | ||
| 1055 | #else /* End STM32F0XX || STM32F1XX || STM32F3XX */ | ||
| 1056 | #warning Sending remote wakeup packet not implemented for your platform. | ||
| 1057 | #endif | ||
| 1058 | } | ||
| 1059 | |||
| 1060 | /* --------------------------------------------------------- | 1039 | /* --------------------------------------------------------- |
| 1061 | * Keyboard functions | 1040 | * Keyboard functions |
| 1062 | * --------------------------------------------------------- | 1041 | * --------------------------------------------------------- |
diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h index 30d8fcaef..b4f894f2f 100644 --- a/tmk_core/protocol/chibios/usb_main.h +++ b/tmk_core/protocol/chibios/usb_main.h | |||
| @@ -36,9 +36,6 @@ | |||
| 36 | /* Initialize the USB driver and bus */ | 36 | /* Initialize the USB driver and bus */ |
| 37 | void init_usb_driver(USBDriver *usbp); | 37 | void init_usb_driver(USBDriver *usbp); |
| 38 | 38 | ||
| 39 | /* Send remote wakeup packet */ | ||
| 40 | void send_remote_wakeup(USBDriver *usbp); | ||
| 41 | |||
| 42 | /* --------------- | 39 | /* --------------- |
| 43 | * Keyboard header | 40 | * Keyboard header |
| 44 | * --------------- | 41 | * --------------- |
