diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-09-08 09:16:15 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-09-08 09:16:15 +0000 |
commit | 4376041f33960189d088ac3d87b7cab178269484 (patch) | |
tree | 293a6d90fe14735f33339b142cd70758e65a8051 /os/hal | |
parent | 8718997f87fb8f05cd6ecf6a2afd2a8c7121438d (diff) | |
download | ChibiOS-4376041f33960189d088ac3d87b7cab178269484.tar.gz ChibiOS-4376041f33960189d088ac3d87b7cab178269484.tar.bz2 ChibiOS-4376041f33960189d088ac3d87b7cab178269484.zip |
Added wake-up and suspend events to OTGv1.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8285 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/usb_lld.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c index 2a5ad8493..33f3b43c4 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c @@ -588,11 +588,16 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) { /* Clear the Remote Wake-up Signaling.*/
otgp->DCTL |= DCTL_RWUSIG;
+
+ /* Signaling the wakeup event.*/
+ _usb_isr_invoke_event_cb(usbp, USB_EVENT_WAKEUP);
}
/* Suspend handling.*/
if (sts & GINTSTS_USBSUSP) {
- /* TODO: Implement suspend mode.*/
+
+ /* Signaling the suspend event.*/
+ _usb_isr_invoke_event_cb(usbp, USB_EVENT_SUSPEND);
}
/* Reset interrupt handling.*/
|