diff options
| author | hathach <[email protected]> | 2019-03-29 01:34:53 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-29 01:34:53 +0700 |
| commit | 0bdd4bd55002c4563154214a4d57581433cae668 (patch) | |
| tree | 7425d94bf510cc944f93fa21959abb344d4f505f /src/device | |
| parent | 8fb9fbb0b19de3422645e65fbd422c86cb548c62 (diff) | |
added Suspend and Resume event for nrf5x port
also rename DCD_EVENT_SUSPENDED to DCD_EVENT_SUSPEND
Diffstat (limited to 'src/device')
| -rw-r--r-- | src/device/dcd.h | 2 | ||||
| -rw-r--r-- | src/device/usbd.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h index 186c4af0c..9abebc2af 100644 --- a/src/device/dcd.h +++ b/src/device/dcd.h @@ -42,7 +42,7 @@ typedef enum DCD_EVENT_BUS_RESET = 1,
DCD_EVENT_UNPLUGGED,
DCD_EVENT_SOF,
- DCD_EVENT_SUSPENDED,
+ DCD_EVENT_SUSPEND,
DCD_EVENT_RESUME,
DCD_EVENT_SETUP_RECEIVED,
diff --git a/src/device/usbd.c b/src/device/usbd.c index 58c0d3c4d..933e0f846 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -40,7 +40,7 @@ // Device Data
//--------------------------------------------------------------------+
typedef struct {
- volatile uint8_t config_num;
+ volatile uint8_t config_num; // 0 is non-configure ~ disconnect
uint8_t itf2drv[16]; // map interface number to driver (0xff is invalid)
uint8_t ep2drv[8][2]; // map endpoint to driver ( 0xff is invalid )
@@ -555,7 +555,7 @@ void dcd_event_handler(dcd_event_t const * event, bool in_isr) // nothing to do now
break;
- case DCD_EVENT_SUSPENDED:
+ case DCD_EVENT_SUSPEND:
// TODO support suspended
break;
|
