1 /* 2 * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /** 14 * @brief Mass storage disk initialization structure 15 */ 16 typedef struct { 17 uint32_t block_size; /**< Block size */ 18 uint32_t block_count; /**< Block count */ 19 } usb_disk_t; 20 21 /** 22 * @brief Register mass storage disk to fat file system 23 * 24 * @param[in] pdrv Number of free drive obtained from ff_diskio_get_drive() function 25 * @param[in] disk usb_disk_t structure 26 */ 27 void ff_diskio_register_msc(uint8_t pdrv, usb_disk_t *disk); 28 29 /** 30 * @brief Obtains number of drive assigned to usb disk upon calling ff_diskio_register_msc() 31 * 32 * @param[in] disk usb_disk_t structure 33 * @return Drive number 34 */ 35 uint8_t ff_diskio_get_pdrv_disk(const usb_disk_t *disk); 36 37 #ifdef __cplusplus 38 } 39 #endif //__cplusplus 40