msc.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2019-2021 Mesotic SAS
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include <stdint.h>
21 #include "usb/usbus.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
34 #define USB_MSC_SUBCLASS_SCSI 0x00
35 #define USB_MSC_SUBCLASS_RBC 0x01
36 #define USB_MSC_SUBCLASS_MMC5 0x02
37 #define USB_MSC_SUBCLASS_UFI 0x04
38 #define USB_MSC_SUBCLASS_SCSI_TCS 0x06
39 #define USB_MSC_SUBCLASS_LSDFS 0x07
40 #define USB_MSC_SUBCLASS_IEEE1667 0x08
41 #define USB_MSC_SUBCLASS_VENDOR 0xFF
51 #define USB_MSC_PROTOCOL_CBI_CCI 0x00
52 #define USB_MSC_PROTOCOL_CBI_NO_CCI 0x01
54 #define USB_MSC_PROTOCOL_BBB 0x50
55 #define USB_MSC_PROTOCOL_UAS 0x62
56 #define USB_MSC_PROTOCOL_VENDOR 0xFF
65 #define USB_MSC_CBW_FLAG_IN 0x80
74 #define USB_MSC_SETUP_REQ_ADSC 0x01
75 #define USB_MSC_SETUP_REQ_GET_REQ 0xFC
76 #define USB_MSC_SETUP_REQ_PUT_REQ 0xFD
77 #define USB_MSC_SETUP_REQ_GML 0xFE
78 #define USB_MSC_SETUP_REQ_BOMSR 0xFF
88 #define USB_MSC_CSW_STATUS_COMMAND_PASSED 0x00
89 #define USB_MSC_CSW_STATUS_COMMAND_FAILED 0x01
90 #define USB_MSC_CSW_STATUS_COMMAND_PHASE_ERROR 0x02
93 #ifdef __cplusplus
94 }
95 #endif
96 
USBUS basic interface.