2 * Copyright 2014, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
9 // (Partial) USB Class Definitions for Mass Storage Devices (MSC), version 1.0
10 // Reference: http://www.usb.org/developers/devclass_docs/usbmassbulk_10.pdf
13 #define USB_MASS_STORAGE_DEVICE_CLASS 0x08
15 #define USB_MASSBULK_CBW_SIGNATURE 0x43425355
16 #define USB_MASSBULK_CBW_DATA_OUTPUT 0x00
17 #define USB_MASSBULK_CBW_DATA_INPUT 0x80
19 #define USB_MASSBULK_CSW_SIGNATURE 0x53425355
20 #define USB_MASSBULK_CSW_STATUS_COMMAND_PASSED 0x00
21 #define USB_MASSBULK_CSW_STATUS_COMMAND_FAILED 0x01
22 #define USB_MASSBULK_CSW_STATUS_PHASE_ERROR 0x02
24 #define USB_MASSBULK_REQUEST_MASS_STORAGE_RESET 0xff
25 #define USB_MASSBULK_REQUEST_GET_MAX_LUN 0xfe
31 uint32 data_transfer_length
;
34 uint8 command_block_length
;
35 uint8 command_block
[16];
36 } _PACKED usb_massbulk_command_block_wrapper
;
44 } _PACKED usb_massbulk_command_status_wrapper
;