summaryrefslogtreecommitdiff
path: root/tinyusb/device/dcd_lpc175x_6x.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-11-22 15:16:24 +0700
committerhathach <[email protected]>2013-11-22 15:16:24 +0700
commit83f1d660ce1a1520b7a7e781d05c47221067f3f7 (patch)
treec86ce99d5ce7feb84669c9d390eb80cf29590076 /tinyusb/device/dcd_lpc175x_6x.c
parentd1ef89a1543581d1703ea43b0056b5112fd64019 (diff)
clean up
add some doxygen work finalize device disconnection & suspend - suspend & resume & remote wake up is not supported yet
Diffstat (limited to 'tinyusb/device/dcd_lpc175x_6x.c')
-rw-r--r--tinyusb/device/dcd_lpc175x_6x.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/tinyusb/device/dcd_lpc175x_6x.c b/tinyusb/device/dcd_lpc175x_6x.c
index d755b94ee..bb6410e02 100644
--- a/tinyusb/device/dcd_lpc175x_6x.c
+++ b/tinyusb/device/dcd_lpc175x_6x.c
@@ -217,14 +217,21 @@ void dcd_isr(uint8_t coreid)
usbd_dcd_bus_event_isr(0, USBD_BUS_EVENT_RESET);
}
- if ( (dev_status_reg & SIE_DEV_STATUS_CONNECT_CHANGE_MASK) && !(dev_status_reg & SIE_DEV_STATUS_CONNECT_STATUS_MASK))
- { // TODO device is disconnected, require using VBUS (P1_30), cannot use CONNECT_STATUS as connection status
+ if (dev_status_reg & SIE_DEV_STATUS_CONNECT_CHANGE_MASK)
+ { // device is disconnected, require using VBUS (P1_30)
usbd_dcd_bus_event_isr(0, USBD_BUS_EVENT_UNPLUGGED);
}
- if ( (dev_status_reg & SIE_DEV_STATUS_SUSPEND_CHANGE_MASK) && (dev_status_reg & SIE_DEV_STATUS_SUSPEND_MASK) )
+ if (dev_status_reg & SIE_DEV_STATUS_SUSPEND_CHANGE_MASK)
{
- usbd_dcd_bus_event_isr(0, USBD_BUS_EVENT_SUSPENDED);
+ if (dev_status_reg & SIE_DEV_STATUS_SUSPEND_MASK)
+ {
+ usbd_dcd_bus_event_isr(0, USBD_BUS_EVENT_SUSPENDED);
+ }
+// else
+// {
+// usbd_dcd_bus_event_isr(0, USBD_BUS_EVENT_RESUME);
+// }
}
}