STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
ff_gen_drv.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __FF_GEN_DRV_H
30 #define __FF_GEN_DRV_H
31 
32 #ifdef __cplusplus
33  extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include "diskio.h"
38 #include "ff.h"
39 
40 /* Exported types ------------------------------------------------------------*/
41 
45 typedef struct
46 {
50 #if _USE_WRITE == 1
51  DRESULT (*disk_write) (BYTE, const BYTE*, DWORD, UINT);
52 #endif /* _USE_WRITE == 1 */
53 #if _USE_IOCTL == 1
54  DRESULT (*disk_ioctl) (BYTE, BYTE, void*);
55 #endif /* _USE_IOCTL == 1 */
56 
58 
62 typedef struct
63 {
64  uint8_t is_initialized[_VOLUMES];
66  uint8_t lun[_VOLUMES];
67  __IO uint8_t nbr;
68 
70 
71 /* Exported constants --------------------------------------------------------*/
72 /* Exported macro ------------------------------------------------------------*/
73 /* Exported functions ------------------------------------------------------- */
74 uint8_t FATFS_LinkDriverEx(Diskio_drvTypeDef *drv, char *path, uint8_t lun);
75 uint8_t FATFS_LinkDriver(Diskio_drvTypeDef *drv, char *path);
76 uint8_t FATFS_UnLinkDriver(char *path);
77 uint8_t FATFS_LinkDriverEx(Diskio_drvTypeDef *drv, char *path, BYTE lun);
78 uint8_t FATFS_UnLinkDriverEx(char *path, BYTE lun);
79 uint8_t FATFS_GetAttachedDriversNbr(void);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* __FF_GEN_DRV_H */
86 
87 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
88 
Disk IO Driver structure definition.
Definition: ff_gen_drv.h:45
uint8_t FATFS_UnLinkDriverEx(char *path, BYTE lun)
#define _VOLUMES
Definition: ffconf.h:204
unsigned long DWORD
Definition: integer.h:29
DRESULT disk_write(BYTE pdrv, const BYTE *buff, DWORD sector, UINT count)
Writes Sector(s)
Definition: diskio.c:114
uint8_t FATFS_GetAttachedDriversNbr(void)
Gets number of linked drivers to the FatFs module.
Definition: ff_gen_drv.c:126
BYTE DSTATUS
Definition: diskio.h:19
DRESULT
Definition: diskio.h:22
unsigned char BYTE
Definition: integer.h:16
DSTATUS disk_status(BYTE pdrv)
Gets Disk Status.
Definition: diskio.c:55
#define __IO
Definition: core_cm0.h:213
DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)
I/O control operation.
Definition: diskio.c:136
Global Disk IO Drivers structure definition.
Definition: ff_gen_drv.h:62
uint8_t FATFS_LinkDriver(Diskio_drvTypeDef *drv, char *path)
Links a compatible diskio driver and increments the number of active linked drivers.
Definition: ff_gen_drv.c:78
__IO uint8_t nbr
Definition: ff_gen_drv.h:67
DSTATUS disk_initialize(BYTE pdrv)
Initializes a Drive.
Definition: diskio.c:70
uint8_t FATFS_UnLinkDriver(char *path)
Unlinks a diskio driver and decrements the number of active linked drivers.
Definition: ff_gen_drv.c:116
unsigned int UINT
Definition: integer.h:25
DRESULT disk_read(BYTE pdrv, BYTE *buff, DWORD sector, UINT count)
Reads Sector(s)
Definition: diskio.c:92
uint8_t FATFS_LinkDriverEx(Diskio_drvTypeDef *drv, char *path, uint8_t lun)
Links a compatible diskio driver/lun id and increments the number of active linked drivers...
Definition: ff_gen_drv.c:49