2 ******************************************************************************
4 * @author MCD Application Team
6 * @date 09-November-2015
7 * @brief header for the STORAGE DISK file file
8 ******************************************************************************
11 * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2>
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 * You may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at:
17 * http://www.st.com/software_license_agreement_liberty_v2
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
25 ******************************************************************************
28 /* Define to prevent recursive inclusion -------------------------------------*/
32 /** @defgroup USBD_MEM_Exported_Defines
35 #define USBD_STD_INQUIRY_LENGTH 36
40 /** @defgroup USBD_MEM_Exported_TypesDefinitions
44 typedef struct _USBD_STORAGE
46 int8_t (* Init
) (uint8_t lun
);
47 int8_t (* GetCapacity
) (uint8_t lun
, uint32_t *block_num
, uint32_t *block_size
);
48 int8_t (* IsReady
) (uint8_t lun
);
49 int8_t (* IsWriteProtected
) (uint8_t lun
);
50 int8_t (* Read
) (uint8_t lun
, uint8_t *buf
, uint32_t blk_addr
, uint16_t blk_len
);
51 int8_t (* Write
)(uint8_t lun
, uint8_t *buf
, uint32_t blk_addr
, uint16_t blk_len
);
52 int8_t (* GetMaxLun
)(void);
55 } USBD_STORAGE_cb_TypeDef
;
57 /** @defgroup USBD_MEM_Exported_FunctionsPrototype
60 extern USBD_STORAGE_cb_TypeDef
*USBD_STORAGE_fops
;