usbd_msc_bot.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 
30 #include "usbd_core.h"
31 
32 /* Define to prevent recursive inclusion -------------------------------------*/
33 #ifndef __USBD_MSC_BOT_H
34 #define __USBD_MSC_BOT_H
35 
49 #define BOT_IDLE 0 /* Idle state */
50 #define BOT_DATA_OUT 1 /* Data Out state */
51 #define BOT_DATA_IN 2 /* Data In state */
52 #define BOT_LAST_DATA_IN 3 /* Last Data In Last */
53 #define BOT_SEND_DATA 4 /* Send Immediate data */
54 
55 #define BOT_CBW_SIGNATURE 0x43425355
56 #define BOT_CSW_SIGNATURE 0x53425355
57 #define BOT_CBW_LENGTH 31
58 #define BOT_CSW_LENGTH 13
59 
60 /* CSW Status Definitions */
61 #define CSW_CMD_PASSED 0x00
62 #define CSW_CMD_FAILED 0x01
63 #define CSW_PHASE_ERROR 0x02
64 
65 /* BOT Status */
66 #define BOT_STATE_NORMAL 0
67 #define BOT_STATE_RECOVERY 1
68 #define BOT_STATE_ERROR 2
69 
70 
71 #define DIR_IN 0
72 #define DIR_OUT 1
73 #define BOTH_DIR 2
74 
83 typedef struct _MSC_BOT_CBW
84 {
85  uint32_t dSignature;
86  uint32_t dTag;
87  uint32_t dDataLength;
88  uint8_t bmFlags;
89  uint8_t bLUN;
90  uint8_t bCBLength;
91  uint8_t CB[16];
92 }
94 
95 
96 typedef struct _MSC_BOT_CSW
97 {
98  uint32_t dSignature;
99  uint32_t dTag;
100  uint32_t dDataResidue;
101  uint8_t bStatus;
102 }
104 
114 extern uint8_t MSC_BOT_Data[];
115 extern uint16_t MSC_BOT_DataLen;
116 extern uint8_t MSC_BOT_State;
117 extern uint8_t MSC_BOT_BurstMode;
126 void MSC_BOT_Init (USB_OTG_CORE_HANDLE *pdev);
130  uint8_t epnum);
131 
133  uint8_t epnum);
134 
136  uint8_t CSW_Status);
137 
139  uint8_t epnum);
144 #endif /* __USBD_MSC_BOT_H */
145 
152 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
153 
uint32_t dDataResidue
Definition: usbd_msc_bot.h:100
uint32_t dSignature
Definition: usbd_msc_bot.h:85
void MSC_BOT_DeInit(USB_OTG_CORE_HANDLE *pdev)
MSC_BOT_DeInit Uninitialize the BOT Machine.
Definition: usbd_msc_bot.c:168
uint8_t MSC_BOT_Data[]
uint8_t bmFlags
Definition: usbd_msc_bot.h:88
uint32_t dTag
Definition: usbd_msc_bot.h:86
void MSC_BOT_Reset(USB_OTG_CORE_HANDLE *pdev)
MSC_BOT_Reset Reset the BOT Machine.
Definition: usbd_msc_bot.c:151
void MSC_BOT_SendCSW(USB_OTG_CORE_HANDLE *pdev, uint8_t CSW_Status)
MSC_BOT_SendCSW Send the Command Status Wrapper.
Definition: usbd_msc_bot.c:322
struct _MSC_BOT_CBW MSC_BOT_CBW_TypeDef
struct _MSC_BOT_CSW MSC_BOT_CSW_TypeDef
uint32_t dDataLength
Definition: usbd_msc_bot.h:87
uint8_t MSC_BOT_BurstMode
uint32_t dTag
Definition: usbd_msc_bot.h:99
uint8_t CB[16]
Definition: usbd_msc_bot.h:91
void MSC_BOT_DataIn(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
MSC_BOT_DataIn Handle BOT IN data stage.
Definition: usbd_msc_bot.c:181
MSC_BOT_CBW_TypeDef MSC_BOT_cbw
uint8_t MSC_BOT_State
Definition: usbd_msc_bot.c:75
void MSC_BOT_CplClrFeature(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
MSC_BOT_CplClrFeature Complete the clear feature request.
Definition: usbd_msc_bot.c:377
MSC_BOT_CSW_TypeDef MSC_BOT_csw
uint16_t MSC_BOT_DataLen
Definition: usbd_msc_bot.c:74
uint8_t bLUN
Definition: usbd_msc_bot.h:89
uint8_t bCBLength
Definition: usbd_msc_bot.h:90
uint8_t bStatus
Definition: usbd_msc_bot.h:101
uint32_t dSignature
Definition: usbd_msc_bot.h:98
Header file for usbd_core.c.
void MSC_BOT_Init(USB_OTG_CORE_HANDLE *pdev)
MSC_BOT_Init Initialize the BOT Process.
Definition: usbd_msc_bot.c:130
void MSC_BOT_DataOut(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
MSC_BOT_DataOut Proccess MSC OUT data.
Definition: usbd_msc_bot.c:213


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:20