WB32F10x Standard Peripherals Firmware Library

USB_Mass_Storage_SPI_FLASH/usbd_msc.h
1 /* Define to prevent recursive inclusion -------------------------------------*/
2 #ifndef __USBD_MSC_H
3 #define __USBD_MSC_H
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /* Includes ------------------------------------------------------------------*/
10 #include <stdint.h>
11 #include "usb_msc_def.h"
12 #include "usbd_core.h"
13 #include "usbd_user_msc.h"
14
15 /* Exported types ------------------------------------------------------------*/
16 typedef struct
17 {
18 USB_MSC_CBW cbw;
19 USB_MSC_CSW csw;
20 uint8_t bot_state;
21 uint8_t bulk_buf[64];
22 } usbd_msc_t;
23
24
25 /* Exported constants --------------------------------------------------------*/
26 #define MSC_BS_IDLE 0
27 #define MSC_BS_DATA_OUT 1
28 #define MSC_BS_DATA_IN 2
29 #define MSC_BS_DATA_IN_LAST 3
30 #define MSC_BS_STATUS 4
31 #define MSC_BS_ERROR 5
32
33 /* Exported macro ------------------------------------------------------------*/
34 /* Exported functions --------------------------------------------------------*/
35
36 UsbdControlStage USBD_EndPoint0_Setup_MSC_Req(void);
37
38 void USBD_MSC_Init(void);
39 void USBD_MSC_DeInit(void);
40 void USBD_MSC_Bulk_Out(void);
41 void USBD_MSC_Bulk_In(void);
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47 #endif /* __USBD_MSC_H */
usbd_msc_t
Definition: USB_Mass_Storage_SPI_FLASH/usbd_msc.h:16
usbd_core.h