ARMEBS4  revision-26.06.2015
usbd_msc_mem.h
1 #include "heivs/config.h"
2 #if (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE)
3 /**
4  ******************************************************************************
5  * @file usbd_msc_mem.h
6  * @author MCD Application Team
7  * @version V1.1.0
8  * @date 19-March-2012
9  * @brief header for the STORAGE DISK file file
10  ******************************************************************************
11  * @attention
12  *
13  * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
14  *
15  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
16  * You may not use this file except in compliance with the License.
17  * You may obtain a copy of the License at:
18  *
19  * http://www.st.com/software_license_agreement_liberty_v2
20  *
21  * Unless required by applicable law or agreed to in writing, software
22  * distributed under the License is distributed on an "AS IS" BASIS,
23  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24  * See the License for the specific language governing permissions and
25  * limitations under the License.
26  *
27  ******************************************************************************
28  */
29 
30 /* Define to prevent recursive inclusion -------------------------------------*/
31 
32 #ifndef __USBD_MEM_H
33 #define __USBD_MEM_H
34 /* Includes ------------------------------------------------------------------*/
35 #include "stm32/usb/usbd_def.h"
36 #include <stdint.h>
37 
38 
39 /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
40  * @{
41  */
42 
43 /** @defgroup USBD_MEM
44  * @brief header file for the storage disk file
45  * @{
46  */
47 
48 /** @defgroup USBD_MEM_Exported_Defines
49  * @{
50  */
51 #define USBD_STD_INQUIRY_LENGTH 36
52 /**
53  * @}
54  */
55 
56 
57 /** @defgroup USBD_MEM_Exported_TypesDefinitions
58  * @{
59  */
60 
61 typedef struct _USBD_STORAGE
62 {
63  int8_t (* Init) (uint8_t lun);
64  int8_t (* GetCapacity) (uint8_t lun, uint32_t *block_num, uint32_t *block_size);
65  int8_t (* IsReady) (uint8_t lun);
66  int8_t (* IsWriteProtected) (uint8_t lun);
67  int8_t (* Read) (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
68  int8_t (* Write)(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
69  int8_t (* GetMaxLun)(void);
70  const int8_t *pInquiry;
71 
72 }USBD_STORAGE_cb_TypeDef;
73 /**
74  * @}
75  */
76 
77 
78 
79 /** @defgroup USBD_MEM_Exported_Macros
80  * @{
81  */
82 
83 /**
84  * @}
85  */
86 
87 /** @defgroup USBD_MEM_Exported_Variables
88  * @{
89  */
90 
91 /**
92  * @}
93  */
94 
95 /** @defgroup USBD_MEM_Exported_FunctionsPrototype
96  * @{
97  */
98 extern USBD_STORAGE_cb_TypeDef *USBD_STORAGE_fops;
99 /**
100  * @}
101  */
102 
103 #endif /* __USBD_MEM_H */
104 /**
105  * @}
106  */
107 
108 /**
109  * @}
110  */
111 
112 /**
113 * @}
114 */
115 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
116 #endif /* (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE) */
libheivs configuration file