diff options
| author | Bernard Xiong <[email protected]> | 2017-11-15 21:39:28 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-11-15 21:39:28 +0800 |
| commit | 0c6c08429d316830997eae172ed5146a8627dfb3 (patch) | |
| tree | c03324f133892f06876ba4c26149d6091749e086 /components/drivers/include | |
| parent | 66ddbbfef9b86e54e71d9f2abffe62fe4beeae08 (diff) | |
| parent | a3808362aca372512cddb11abccf5a865ed2362f (diff) | |
Merge pull request #1004 from uestczyh222/master
[Components][Drivers][USB]fix usb device core
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/usb_common.h | 11 | ||||
| -rw-r--r-- | components/drivers/include/drivers/usb_device.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/components/drivers/include/drivers/usb_common.h b/components/drivers/include/drivers/usb_common.h index 866909f3a7..08462d9244 100644 --- a/components/drivers/include/drivers/usb_common.h +++ b/components/drivers/include/drivers/usb_common.h @@ -21,6 +21,7 @@ * Date Author Notes * 2012-10-01 Yi Qiu first version * 2013-04-26 aozima add DEVICEQUALIFIER support. + * 2017-11-15 ZYH fix ep0 transform error */ #ifndef __USB_COMMON_H__ @@ -241,6 +242,16 @@ typedef enum USB_STATE_SUSPENDED }udevice_state_t; +typedef enum +{ + STAGE_IDLE, + STAGE_SETUP, + STAGE_STATUS_IN, + STAGE_STATUS_OUT, + STAGE_DIN, + STAGE_DOUT +} uep0_stage_t; + #pragma pack(1) struct usb_descriptor diff --git a/components/drivers/include/drivers/usb_device.h b/components/drivers/include/drivers/usb_device.h index fbbae7edb9..5e2417e90d 100644 --- a/components/drivers/include/drivers/usb_device.h +++ b/components/drivers/include/drivers/usb_device.h @@ -22,6 +22,7 @@ * 2012-10-01 Yi Qiu first version * 2012-12-12 heyuanjie87 change endpoint and function handler * 2013-04-26 aozima add DEVICEQUALIFIER support. + * 2017-11-15 ZYH fix ep0 transform error */ #ifndef __USB_DEVICE_H__ @@ -137,6 +138,7 @@ struct udcd struct rt_device parent; const struct udcd_ops* ops; struct uendpoint ep0; + uep0_stage_t stage; struct ep_id* ep_pool; }; typedef struct udcd* udcd_t; |
