![]()  | 
  
    PDK API Guide for J721E
    
   | 
 
FATFS interface for driver.
============================================================================
The SD header file should be included in an application as follows:
Go to the source code of this file.
Data Structures | |
| struct | FATFS_ConfigParams | 
| SD Parameters.  More... | |
| struct | FATFS_DrvFxnTable | 
| The definition of a SD function table that contains the required set of functions to control a specific SD driver implementation.  More... | |
| struct | FATFS_HwAttrs | 
| SDAm57x Hardware attributes.  More... | |
| struct | FATFS_Object | 
| SDAm572x Object.  More... | |
| struct | FATFS_Config | 
| SD Global configuration.  More... | |
Macros | |
| #define | FATFS_OK 0 | 
| #define | FATFS_ERR (-(1)) | 
| #define | FATFS_VOLUME_FULL_ERR (-(10)) | 
| #define | FATFS_VOLUME_DISK_AVL (0) | 
| #define | FATFS_MBR_TABLE (446) | 
| #define | FATFS_SZ_PTE (16) | 
| #define | FATFS_NUM_OF_PARTITIONS (4) | 
| #define | FATFS_MBR_PT_TYPE_OFFSET (4) | 
| #define | FATFS_DFLT_VOLUME_PD (0xf) | 
| #define | FATFS_DFLT_VOLUME_PT (0xf) | 
| #define | FATFS_MOUNT_IMMEDIATE (1) | 
| #define | FATFS_MOUNT_LATER (0) | 
| #define | FATFS_MEDIA_BOOT_SEC_OFFSET (21) | 
| #define | FATFS_JUMP_BOOT_SEC_OFFSET (0) | 
| #define | FATFS_BOOT_MEDIA_TYPE_NON_REM (0xF0) | 
| #define | FATFS_BOOT_MEDIA_REM_TYPE_MIN (0xF8) | 
| #define | FATFS_BOOT_MEDIA_REM_TYPE_MAX (0xFF) | 
| #define | FATFS_JUMP_BOOT_SEC_JMP_INS_0 (0xEB) | 
| #define | FATFS_JUMP_BOOT_SEC_JMP_INS_1 (0xE9) | 
Typedefs | |
| typedef int32_t | FATFS_Error | 
| Return status of FATFS.  More... | |
| typedef void * | FATFS_Handle | 
| A handle that is returned from a FATFS_open() call.  More... | |
| typedef void * | FATFS_Params | 
| Parameters that is required for FATFS_open() call.  More... | |
| typedef void * | FATFS_DrvHandle | 
| A handle that is returned to open driver.  More... | |
| typedef void * | FATFS_DrvParams | 
| Parameters that is required to open driver.  More... | |
| typedef FATFS_Error(* | FATFS_CloseDrvFxn) (FATFS_DrvHandle drvHandle) | 
| A function pointer to a driver specific implementation of FATFS_close().  More... | |
| typedef FATFS_Error(* | FATFS_ControlDrvFxn) (FATFS_DrvHandle drvHandle, uint32_t cmd, void *arg) | 
| A function pointer to a driver specific implementation of FATFS_control().  More... | |
| typedef FATFS_Error(* | FATFS_InitDrvFxn) (void) | 
| A function pointer to a driver specific implementation of FATFS_init().  More... | |
| typedef FATFS_Error(* | FATFS_OpenDrvFxn) (uint32_t index, FATFS_DrvParams drvParams, FATFS_DrvHandle *drvHandle) | 
| A function pointer to a driver specific implementation of FATFS_open().  More... | |
| typedef FATFS_Error(* | FATFS_WriteDrvFxn) (FATFS_DrvHandle drvHandle, uint8_t *buf, uint32_t block, uint32_t numBlks) | 
| A function pointer to a driver specific implementation of FATFS_transfer().  More... | |
| typedef FATFS_Error(* | FATFS_ReadDrvFxn) (FATFS_DrvHandle drvHandle, uint8_t *buf, uint32_t block, uint32_t numBlks) | 
| A function pointer to a driver specific implementation of FATFS_transfer().  More... | |
| typedef FATFS_Config | FATFSConfigList[((uint32_t) _VOLUMES)+(uint32_t) 1U] | 
Functions | |
| FATFS_Error | FATFS_close (FATFS_Handle handle) | 
| Function to close a SD peripheral specified by the SD handle.  More... | |
| FATFS_Error | FATFS_open (uint32_t index, FATFS_Params params, FATFS_Handle *handle) | 
| Function to initialize a given SD peripheral specified by the particular index value. The parameter specifies which mode the SD will operate.  More... | |
| FATFS_Error | FATFS_Params_init (FATFS_Params params) | 
| Function to initialize the FATFS_Params struct to its defaults.  More... | |
| FATFS_Error | FATFS_init (void) | 
| Function to initializes the FATFS module.  More... | |
Variables | |
| FATFS_DrvFxnTable | FATFS_drvFxnTable | 
| #define FATFS_OK 0 | 
FATFS return code – Function executed successfully
| #define FATFS_ERR (-(1)) | 
FATFS return code – Function executed failed
| #define FATFS_VOLUME_FULL_ERR (-(10)) | 
FATFS return code – VolToPart structure is full and no index to add more partitions
| #define FATFS_VOLUME_DISK_AVL (0) | 
FATFS status code – VolToPart structure is available to add partitions
| #define FATFS_MBR_TABLE (446) | 
MBR: Partition table offset
| #define FATFS_SZ_PTE (16) | 
MBR: Size of a partition table entry
| #define FATFS_NUM_OF_PARTITIONS (4) | 
Number of partitions supported
| #define FATFS_MBR_PT_TYPE_OFFSET (4) | 
Partition Type offset of each partition entry in MBR
| #define FATFS_DFLT_VOLUME_PD (0xf) | 
Default value of the VolToPart structure variable: partition disk
| #define FATFS_DFLT_VOLUME_PT (0xf) | 
Default value of the VolToPart structure variable: partition number
| #define FATFS_MOUNT_IMMEDIATE (1) | 
Value to mount the partition immediately during f_mount function call
| #define FATFS_MOUNT_LATER (0) | 
Value to mount the partition later during f_open function call but not during f_mount function call
| #define FATFS_MEDIA_BOOT_SEC_OFFSET (21) | 
Offset of Media field in the BOOT Sector which holds the information of the device is removable or non removable media.
| #define FATFS_JUMP_BOOT_SEC_OFFSET (0) | 
Offset of the JUMP instruction field which holds the information of three byte unconditional branch instruction.
| #define FATFS_BOOT_MEDIA_TYPE_NON_REM (0xF0) | 
Standard value of Media offset in Boot sector for non removable media.
| #define FATFS_BOOT_MEDIA_REM_TYPE_MIN (0xF8) | 
Legal minimum value of Media offset in Boot sector for removable media.
| #define FATFS_BOOT_MEDIA_REM_TYPE_MAX (0xFF) | 
Legal maximum value of Media offset in Boot sector for removable media.
| #define FATFS_JUMP_BOOT_SEC_JMP_INS_0 (0xEB) | 
Valid JUMP INstruction code value to jump to bootstrap code.
| #define FATFS_JUMP_BOOT_SEC_JMP_INS_1 (0xE9) | 
Another Valid JUMP INstruction code value to jump to bootstrap code.
| typedef int32_t FATFS_Error | 
Return status of FATFS.
| typedef void* FATFS_Handle | 
A handle that is returned from a FATFS_open() call.
| typedef void* FATFS_Params | 
Parameters that is required for FATFS_open() call.
| typedef void* FATFS_DrvHandle | 
A handle that is returned to open driver.
| typedef void* FATFS_DrvParams | 
Parameters that is required to open driver.
| typedef FATFS_Error(* FATFS_CloseDrvFxn) (FATFS_DrvHandle drvHandle) | 
A function pointer to a driver specific implementation of FATFS_close().
| typedef FATFS_Error(* FATFS_ControlDrvFxn) (FATFS_DrvHandle drvHandle, uint32_t cmd, void *arg) | 
A function pointer to a driver specific implementation of FATFS_control().
| typedef FATFS_Error(* FATFS_InitDrvFxn) (void) | 
A function pointer to a driver specific implementation of FATFS_init().
| typedef FATFS_Error(* FATFS_OpenDrvFxn) (uint32_t index, FATFS_DrvParams drvParams, FATFS_DrvHandle *drvHandle) | 
A function pointer to a driver specific implementation of FATFS_open().
| typedef FATFS_Error(* FATFS_WriteDrvFxn) (FATFS_DrvHandle drvHandle, uint8_t *buf, uint32_t block, uint32_t numBlks) | 
A function pointer to a driver specific implementation of FATFS_transfer().
| typedef FATFS_Error(* FATFS_ReadDrvFxn) (FATFS_DrvHandle drvHandle, uint8_t *buf, uint32_t block, uint32_t numBlks) | 
A function pointer to a driver specific implementation of FATFS_transfer().
| typedef FATFS_Config FATFSConfigList[((uint32_t) _VOLUMES)+(uint32_t) 1U] | 
| FATFS_Error FATFS_close | ( | FATFS_Handle | handle | ) | 
Function to close a SD peripheral specified by the SD handle.
| handle | A FATFS_Handle returned from FATFS_open | 
| FATFS_Error FATFS_open | ( | uint32_t | index, | 
| FATFS_Params | params, | ||
| FATFS_Handle * | handle | ||
| ) | 
Function to initialize a given SD peripheral specified by the particular index value. The parameter specifies which mode the SD will operate.
| index | Logical peripheral number for the disk indexed into the FATFS_config table | 
| params | Pointer to an parameter block, if NULL it will use default values. All the fields in this structure are RO (read-only). | 
| handle | Handle to the FATFS driver which holds the hardware attributes and object filesystem parameters. | 
| FATFS_Error FATFS_Params_init | ( | FATFS_Params | params | ) | 
Function to initialize the FATFS_Params struct to its defaults.
| params | An pointer to FATFS_Params structure for initialization | 
| FATFS_Error FATFS_init | ( | void | ) | 
Function to initializes the FATFS module.
| FATFS_DrvFxnTable FATFS_drvFxnTable |