Loading...
Searching...
No Matches
msc.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019-2021 Mesotic SAS
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for
6 * more details.
7 *
8 *
9 */
10
11#pragma once
12
24
25#include <stdint.h>
26#include "usb/usbus.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
39#define USB_MSC_SUBCLASS_SCSI 0x00
40#define USB_MSC_SUBCLASS_RBC 0x01
41#define USB_MSC_SUBCLASS_MMC5 0x02
42#define USB_MSC_SUBCLASS_UFI 0x04
43#define USB_MSC_SUBCLASS_SCSI_TCS 0x06
44#define USB_MSC_SUBCLASS_LSDFS 0x07
45#define USB_MSC_SUBCLASS_IEEE1667 0x08
46#define USB_MSC_SUBCLASS_VENDOR 0xFF
48
56#define USB_MSC_PROTOCOL_CBI_CCI 0x00
57#define USB_MSC_PROTOCOL_CBI_NO_CCI 0x01
59#define USB_MSC_PROTOCOL_BBB 0x50
60#define USB_MSC_PROTOCOL_UAS 0x62
61#define USB_MSC_PROTOCOL_VENDOR 0xFF
63
70#define USB_MSC_CBW_FLAG_IN 0x80
71
79#define USB_MSC_SETUP_REQ_ADSC 0x01
80#define USB_MSC_SETUP_REQ_GET_REQ 0xFC
81#define USB_MSC_SETUP_REQ_PUT_REQ 0xFD
82#define USB_MSC_SETUP_REQ_GML 0xFE
83#define USB_MSC_SETUP_REQ_BOMSR 0xFF
85
93#define USB_MSC_CSW_STATUS_COMMAND_PASSED 0x00
94#define USB_MSC_CSW_STATUS_COMMAND_FAILED 0x01
95#define USB_MSC_CSW_STATUS_COMMAND_PHASE_ERROR 0x02
97
98#ifdef __cplusplus
99}
100#endif
101
USBUS basic interface.