Last change
on this file since d7f7a4a was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
Replace some license headers with SPDX identifier
Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.
|
-
Property mode
set to
100644
|
File size:
885 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * SPDX-FileCopyrightText: 2011 Vojtech Horky
|
---|
3 | *
|
---|
4 | * SPDX-License-Identifier: BSD-3-Clause
|
---|
5 | */
|
---|
6 |
|
---|
7 | /** @addtogroup drvusbmast
|
---|
8 | * @{
|
---|
9 | */
|
---|
10 | /** @file
|
---|
11 | * USB mass storage commands.
|
---|
12 | */
|
---|
13 |
|
---|
14 | #ifndef CMDW_H_
|
---|
15 | #define CMDW_H_
|
---|
16 |
|
---|
17 | #include <stdint.h>
|
---|
18 | #include <usb/usb.h>
|
---|
19 |
|
---|
20 | typedef struct {
|
---|
21 | uint32_t dCBWSignature;
|
---|
22 | uint32_t dCBWTag;
|
---|
23 | uint32_t dCBWDataTransferLength;
|
---|
24 | uint8_t bmCBWFlags;
|
---|
25 | uint8_t bCBWLUN;
|
---|
26 | uint8_t bCBWBLength;
|
---|
27 | uint8_t CBWCB[16];
|
---|
28 | } __attribute__((packed)) usb_massstor_cbw_t;
|
---|
29 |
|
---|
30 | typedef struct {
|
---|
31 | uint32_t dCSWSignature;
|
---|
32 | uint32_t dCSWTag;
|
---|
33 | uint32_t dCSWDataResidue;
|
---|
34 | uint8_t dCSWStatus;
|
---|
35 | } __attribute__((packed)) usb_massstor_csw_t;
|
---|
36 |
|
---|
37 | enum cmd_block_status {
|
---|
38 | cbs_passed = 0x00,
|
---|
39 | cbs_failed = 0x01,
|
---|
40 | cbs_phase_error = 0x02
|
---|
41 | };
|
---|
42 |
|
---|
43 | extern void usb_massstor_cbw_prepare(usb_massstor_cbw_t *, uint32_t, uint32_t,
|
---|
44 | usb_direction_t, uint8_t, uint8_t, const uint8_t *);
|
---|
45 |
|
---|
46 | #endif
|
---|
47 |
|
---|
48 | /**
|
---|
49 | * @}
|
---|
50 | */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.