MG32F10x Standard Peripherals Firmware Library

USB_Mass_Storage_SRAM/usbd_user_msc.h
1 /* Define to prevent recursive inclusion -------------------------------------*/
2 #ifndef __USBD_USER_MSC_H
3 #define __USBD_USER_MSC_H
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /* Includes ------------------------------------------------------------------*/
10 #include <stdint.h>
11 #include <stdbool.h>
12
13 /* Exported types ------------------------------------------------------------*/
14 /* Exported constants --------------------------------------------------------*/
15 #define USBD_USER_MSC_IF_NUM 0
16
17 #define USBD_USER_MSC_MAXLUN 0
18
19 #define USBD_USER_MSC_BULK_IN_EP 0x81
20 #define USBD_USER_MSC_BULK_OUT_EP 0x01
21
22 /* Exported macro ------------------------------------------------------------*/
23 /* Exported functions --------------------------------------------------------*/
24
25
26 const uint8_t* USBD_User_MSC_GetInquiryData(uint8_t lun, uint32_t* inquiry_data_len);
27 int8_t USBD_User_MSC_GetCapacity(uint8_t lun, uint32_t *block_count, uint32_t *block_size);
28
29 uint32_t USBD_User_MSC_Read(uint8_t lun, uint32_t addr, uint8_t *buf, uint16_t size);
30 int8_t USBD_User_MSC_PrepareWrite(uint8_t lun, uint32_t lba, uint32_t cnt);
31 uint32_t USBD_User_MSC_Write(uint8_t lun, const uint8_t *pdata, uint16_t len);
32
33 #ifdef __cplusplus
34 }
35 #endif
36
37 #endif /* __USBD_USER_MSC_H */