2 ******************************************************************************
4 * @author MCD Application Team
7 * @brief header for the STORAGE DISK file file
8 ******************************************************************************
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
19 ******************************************************************************
22 /* Define to prevent recursive inclusion -------------------------------------*/
26 /* Includes ------------------------------------------------------------------*/
30 /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
34 /** @defgroup USBD_MEM
35 * @brief header file for the storage disk file
39 /** @defgroup USBD_MEM_Exported_Defines
42 #define USBD_STD_INQUIRY_LENGTH 36
48 /** @defgroup USBD_MEM_Exported_TypesDefinitions
52 typedef struct _USBD_STORAGE
54 int8_t (* Init) (uint8_t lun);
55 int8_t (* GetCapacity) (uint8_t lun, uint32_t *block_num, uint32_t *block_size);
56 int8_t (* IsReady) (uint8_t lun);
57 int8_t (* IsWriteProtected) (uint8_t lun);
58 int8_t (* Read) (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
59 int8_t (* Write)(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
60 int8_t (* GetMaxLun)(void);
63 }USBD_STORAGE_cb_TypeDef;
70 /** @defgroup USBD_MEM_Exported_Macros
78 /** @defgroup USBD_MEM_Exported_Variables
86 /** @defgroup USBD_MEM_Exported_FunctionsPrototype
89 extern USBD_STORAGE_cb_TypeDef *USBD_STORAGE_fops;
94 #endif /* __USBD_MEM_H */
106 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/