diff options
Diffstat (limited to 'components/drivers/usb/usbdevice/class/mstorage.h')
| -rw-r--r-- | components/drivers/usb/usbdevice/class/mstorage.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/components/drivers/usb/usbdevice/class/mstorage.h b/components/drivers/usb/usbdevice/class/mstorage.h new file mode 100644 index 0000000000..2ff74e6494 --- /dev/null +++ b/components/drivers/usb/usbdevice/class/mstorage.h @@ -0,0 +1,53 @@ +/*
+ * File : mstorage.h
+ * This file is part of RT-Thread RTOS
+ * COPYRIGHT (C) 2012, RT-Thread Development Team
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rt-thread.org/license/LICENSE
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2012-10-01 Yi Qiu first version
+ */
+#include <rtthread.h>
+
+#define USBREQ_GET_MAX_LUN 0xfe
+#define USBREQ_MASS_STORAGE_RESET 0xff
+
+#define USB_MASS_STORAGE_PRODUCT_ID 0x1000 /* Product ID */
+
+#pragma pack(1)
+
+struct umass_descriptor
+{
+ struct uinterface_descriptor intf_desc;
+ struct uendpoint_descriptor ep_out_desc;
+ struct uendpoint_descriptor ep_in_desc;
+};
+typedef struct umass_descriptor* umass_desc_t;
+
+struct capacity_data
+{
+ rt_uint8_t LastLogicalBlockAddress[4];
+ rt_uint8_t BlockLengthInBytes[4];
+};
+
+struct request_sense_data
+{
+ rt_uint8_t ErrorCode:7;
+ rt_uint8_t Valid:1;
+ rt_uint8_t Reserved1;
+ rt_uint8_t SenseKey:4;
+ rt_uint8_t Reserved2:4;
+ rt_uint8_t Information[4];
+ rt_uint8_t AdditionalSenseLength;
+ rt_uint8_t Reserved3[4];
+ rt_uint8_t AdditionalSenseCode;
+ rt_uint8_t AdditionalSenseCodeQualifier;
+ rt_uint8_t Reserved4[4];
+}request_sense_data_t;
+
+#pragma pack()
+
|
