Merge pull request #12 from heyuanjie87/usb-device
Usb device:correct the macro
This commit is contained in:
commit
64bf67ccfd
|
@ -351,6 +351,27 @@ typedef struct ureqest* ureq_t;
|
||||||
#define CSW_SIGNATURE 0x53425355
|
#define CSW_SIGNATURE 0x53425355
|
||||||
#define CBW_TAG_VALUE 0x12345678
|
#define CBW_TAG_VALUE 0x12345678
|
||||||
|
|
||||||
|
struct ustorage_cbw
|
||||||
|
{
|
||||||
|
rt_uint32_t signature;
|
||||||
|
rt_uint32_t tag;
|
||||||
|
rt_uint32_t xfer_len;
|
||||||
|
rt_uint8_t dflags;
|
||||||
|
rt_uint8_t lun;
|
||||||
|
rt_uint8_t cb_len;
|
||||||
|
rt_uint8_t cb[16];
|
||||||
|
};
|
||||||
|
typedef struct ustorage_cbw* ustorage_cbw_t;
|
||||||
|
|
||||||
|
struct ustorage_csw
|
||||||
|
{
|
||||||
|
rt_uint32_t signature;
|
||||||
|
rt_uint32_t tag;
|
||||||
|
rt_uint32_t data_reside;
|
||||||
|
rt_uint8_t status;
|
||||||
|
};
|
||||||
|
typedef struct ustorage_csw* ustorage_csw_t;
|
||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
/* Vendor ID */
|
/* Vendor ID */
|
||||||
#ifdef USB_VENDOR_ID
|
#ifdef USB_VENDOR_ID
|
||||||
#define USB_VENDOR_ID _VENDOR_ID
|
#define _VENDOR_ID USB_VENDOR_ID
|
||||||
#else
|
#else
|
||||||
#define _VENDOR_ID 0x0EFF
|
#define _VENDOR_ID 0x0EFF
|
||||||
#endif
|
#endif
|
||||||
/* Product ID */
|
/* Product ID */
|
||||||
#ifdef USB_PRODUCT_ID
|
#ifdef USB_PRODUCT_ID
|
||||||
#define USB_PRODUCT_ID _PRODUCT_ID
|
#define _PRODUCT_ID USB_PRODUCT_ID
|
||||||
#else
|
#else
|
||||||
#define _PRODUCT_ID 0x0001
|
#define _PRODUCT_ID 0x0001
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,27 +20,6 @@
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
struct ustorage_cbw
|
|
||||||
{
|
|
||||||
rt_uint32_t signature;
|
|
||||||
rt_uint32_t tag;
|
|
||||||
rt_uint32_t xfer_len;
|
|
||||||
rt_uint8_t dflags;
|
|
||||||
rt_uint8_t lun;
|
|
||||||
rt_uint8_t cb_len;
|
|
||||||
rt_uint8_t cb[16];
|
|
||||||
};
|
|
||||||
typedef struct ustorage_cbw* ustorage_cbw_t;
|
|
||||||
|
|
||||||
struct ustorage_csw
|
|
||||||
{
|
|
||||||
rt_uint32_t signature;
|
|
||||||
rt_uint32_t tag;
|
|
||||||
rt_uint32_t data_reside;
|
|
||||||
rt_uint8_t status;
|
|
||||||
};
|
|
||||||
typedef struct ustorage_csw* ustorage_csw_t;
|
|
||||||
|
|
||||||
struct umass_descriptor
|
struct umass_descriptor
|
||||||
{
|
{
|
||||||
struct uinterface_descriptor intf_desc;
|
struct uinterface_descriptor intf_desc;
|
||||||
|
|
Loading…
Reference in New Issue