STM32F746NG fatfs library

Dependents:   DISCO-F746NG_uSD Active-WolfMan_V2-5-All-Frank-Board-Functions_copy DISCO-F746NG_uSD DISCO-F746NG_uSD

Committer:
buyukesmeli
Date:
Sat Feb 03 14:38:06 2018 +0000
Revision:
0:3a2f06aeceaf
Initial Commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
buyukesmeli 0:3a2f06aeceaf 1 /**
buyukesmeli 0:3a2f06aeceaf 2 ******************************************************************************
buyukesmeli 0:3a2f06aeceaf 3 * @file ff_gen_drv.h
buyukesmeli 0:3a2f06aeceaf 4 * @author MCD Application Team
buyukesmeli 0:3a2f06aeceaf 5 * @version V1.4.0
buyukesmeli 0:3a2f06aeceaf 6 * @date 23-December-2016
buyukesmeli 0:3a2f06aeceaf 7 * @brief Header for ff_gen_drv.c module.
buyukesmeli 0:3a2f06aeceaf 8 ******************************************************************************
buyukesmeli 0:3a2f06aeceaf 9 * @attention
buyukesmeli 0:3a2f06aeceaf 10 *
buyukesmeli 0:3a2f06aeceaf 11 * <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
buyukesmeli 0:3a2f06aeceaf 12 *
buyukesmeli 0:3a2f06aeceaf 13 * Redistribution and use in source and binary forms, with or without
buyukesmeli 0:3a2f06aeceaf 14 * modification, are permitted, provided that the following conditions are met:
buyukesmeli 0:3a2f06aeceaf 15 *
buyukesmeli 0:3a2f06aeceaf 16 * 1. Redistribution of source code must retain the above copyright notice,
buyukesmeli 0:3a2f06aeceaf 17 * this list of conditions and the following disclaimer.
buyukesmeli 0:3a2f06aeceaf 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
buyukesmeli 0:3a2f06aeceaf 19 * this list of conditions and the following disclaimer in the documentation
buyukesmeli 0:3a2f06aeceaf 20 * and/or other materials provided with the distribution.
buyukesmeli 0:3a2f06aeceaf 21 * 3. Neither the name of STMicroelectronics nor the names of other
buyukesmeli 0:3a2f06aeceaf 22 * contributors to this software may be used to endorse or promote products
buyukesmeli 0:3a2f06aeceaf 23 * derived from this software without specific written permission.
buyukesmeli 0:3a2f06aeceaf 24 * 4. This software, including modifications and/or derivative works of this
buyukesmeli 0:3a2f06aeceaf 25 * software, must execute solely and exclusively on microcontroller or
buyukesmeli 0:3a2f06aeceaf 26 * microprocessor devices manufactured by or for STMicroelectronics.
buyukesmeli 0:3a2f06aeceaf 27 * 5. Redistribution and use of this software other than as permitted under
buyukesmeli 0:3a2f06aeceaf 28 * this license is void and will automatically terminate your rights under
buyukesmeli 0:3a2f06aeceaf 29 * this license.
buyukesmeli 0:3a2f06aeceaf 30 *
buyukesmeli 0:3a2f06aeceaf 31 * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
buyukesmeli 0:3a2f06aeceaf 32 * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
buyukesmeli 0:3a2f06aeceaf 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
buyukesmeli 0:3a2f06aeceaf 34 * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
buyukesmeli 0:3a2f06aeceaf 35 * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
buyukesmeli 0:3a2f06aeceaf 36 * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
buyukesmeli 0:3a2f06aeceaf 37 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
buyukesmeli 0:3a2f06aeceaf 38 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
buyukesmeli 0:3a2f06aeceaf 39 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
buyukesmeli 0:3a2f06aeceaf 40 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
buyukesmeli 0:3a2f06aeceaf 41 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
buyukesmeli 0:3a2f06aeceaf 42 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
buyukesmeli 0:3a2f06aeceaf 43 *
buyukesmeli 0:3a2f06aeceaf 44 ******************************************************************************
buyukesmeli 0:3a2f06aeceaf 45 */
buyukesmeli 0:3a2f06aeceaf 46
buyukesmeli 0:3a2f06aeceaf 47 /* Define to prevent recursive inclusion -------------------------------------*/
buyukesmeli 0:3a2f06aeceaf 48 #ifndef __FF_GEN_DRV_H
buyukesmeli 0:3a2f06aeceaf 49 #define __FF_GEN_DRV_H
buyukesmeli 0:3a2f06aeceaf 50
buyukesmeli 0:3a2f06aeceaf 51 #ifdef __cplusplus
buyukesmeli 0:3a2f06aeceaf 52 extern "C" {
buyukesmeli 0:3a2f06aeceaf 53 #endif
buyukesmeli 0:3a2f06aeceaf 54
buyukesmeli 0:3a2f06aeceaf 55 /* Includes ------------------------------------------------------------------*/
buyukesmeli 0:3a2f06aeceaf 56 #include "diskio.h"
buyukesmeli 0:3a2f06aeceaf 57 #include "ff.h"
buyukesmeli 0:3a2f06aeceaf 58
buyukesmeli 0:3a2f06aeceaf 59 /* Exported types ------------------------------------------------------------*/
buyukesmeli 0:3a2f06aeceaf 60
buyukesmeli 0:3a2f06aeceaf 61 /**
buyukesmeli 0:3a2f06aeceaf 62 * @brief Disk IO Driver structure definition
buyukesmeli 0:3a2f06aeceaf 63 */
buyukesmeli 0:3a2f06aeceaf 64 typedef struct
buyukesmeli 0:3a2f06aeceaf 65 {
buyukesmeli 0:3a2f06aeceaf 66 DSTATUS (*disk_initialize) (BYTE); /*!< Initialize Disk Drive */
buyukesmeli 0:3a2f06aeceaf 67 DSTATUS (*disk_status) (BYTE); /*!< Get Disk Status */
buyukesmeli 0:3a2f06aeceaf 68 DRESULT (*disk_read) (BYTE, BYTE*, DWORD, UINT); /*!< Read Sector(s) */
buyukesmeli 0:3a2f06aeceaf 69 #if _USE_WRITE == 1
buyukesmeli 0:3a2f06aeceaf 70 DRESULT (*disk_write) (BYTE, const BYTE*, DWORD, UINT); /*!< Write Sector(s) when _USE_WRITE = 0 */
buyukesmeli 0:3a2f06aeceaf 71 #endif /* _USE_WRITE == 1 */
buyukesmeli 0:3a2f06aeceaf 72 #if _USE_IOCTL == 1
buyukesmeli 0:3a2f06aeceaf 73 DRESULT (*disk_ioctl) (BYTE, BYTE, void*); /*!< I/O control operation when _USE_IOCTL = 1 */
buyukesmeli 0:3a2f06aeceaf 74 #endif /* _USE_IOCTL == 1 */
buyukesmeli 0:3a2f06aeceaf 75
buyukesmeli 0:3a2f06aeceaf 76 }Diskio_drvTypeDef;
buyukesmeli 0:3a2f06aeceaf 77
buyukesmeli 0:3a2f06aeceaf 78 /**
buyukesmeli 0:3a2f06aeceaf 79 * @brief Global Disk IO Drivers structure definition
buyukesmeli 0:3a2f06aeceaf 80 */
buyukesmeli 0:3a2f06aeceaf 81 typedef struct
buyukesmeli 0:3a2f06aeceaf 82 {
buyukesmeli 0:3a2f06aeceaf 83 uint8_t is_initialized[_VOLUMES];
buyukesmeli 0:3a2f06aeceaf 84 Diskio_drvTypeDef *drv[_VOLUMES];
buyukesmeli 0:3a2f06aeceaf 85 uint8_t lun[_VOLUMES];
buyukesmeli 0:3a2f06aeceaf 86 __IO uint8_t nbr;
buyukesmeli 0:3a2f06aeceaf 87
buyukesmeli 0:3a2f06aeceaf 88 }Disk_drvTypeDef;
buyukesmeli 0:3a2f06aeceaf 89
buyukesmeli 0:3a2f06aeceaf 90 /* Exported constants --------------------------------------------------------*/
buyukesmeli 0:3a2f06aeceaf 91 /* Exported macro ------------------------------------------------------------*/
buyukesmeli 0:3a2f06aeceaf 92 /* Exported functions ------------------------------------------------------- */
buyukesmeli 0:3a2f06aeceaf 93 uint8_t FATFS_LinkDriverEx(Diskio_drvTypeDef *drv, char *path, uint8_t lun);
buyukesmeli 0:3a2f06aeceaf 94 uint8_t FATFS_LinkDriver(Diskio_drvTypeDef *drv, char *path);
buyukesmeli 0:3a2f06aeceaf 95 uint8_t FATFS_UnLinkDriver(char *path);
buyukesmeli 0:3a2f06aeceaf 96 uint8_t FATFS_LinkDriverEx(Diskio_drvTypeDef *drv, char *path, BYTE lun);
buyukesmeli 0:3a2f06aeceaf 97 uint8_t FATFS_UnLinkDriverEx(char *path, BYTE lun);
buyukesmeli 0:3a2f06aeceaf 98 uint8_t FATFS_GetAttachedDriversNbr(void);
buyukesmeli 0:3a2f06aeceaf 99
buyukesmeli 0:3a2f06aeceaf 100 #ifdef __cplusplus
buyukesmeli 0:3a2f06aeceaf 101 }
buyukesmeli 0:3a2f06aeceaf 102 #endif
buyukesmeli 0:3a2f06aeceaf 103
buyukesmeli 0:3a2f06aeceaf 104 #endif /* __FF_GEN_DRV_H */
buyukesmeli 0:3a2f06aeceaf 105
buyukesmeli 0:3a2f06aeceaf 106 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
buyukesmeli 0:3a2f06aeceaf 107