![]() |
RA Flexible Software Package Documentation
Release v6.0.0
|
|
Interface for FreeRTOS+FAT port.
The FreeRTOS+FAT port provides notifications for insertion and removal of removable media and provides initialization functions required by FreeRTOS+FAT.
Data Structures | |
struct | rm_freertos_plus_fat_callback_args_t |
struct | rm_freertos_plus_fat_device_t |
struct | rm_freertos_plus_fat_info_t |
struct | rm_freertos_plus_fat_cfg_t |
struct | rm_freertos_plus_fat_disk_cfg_t |
struct | rm_freertos_plus_fat_api_t |
struct | rm_freertos_plus_fat_instance_t |
Typedefs | |
typedef void | rm_freertos_plus_fat_ctrl_t |
Enumerations | |
enum | rm_freertos_plus_fat_event_t |
enum | rm_freertos_plus_fat_type_t |
struct rm_freertos_plus_fat_callback_args_t |
Callback function parameter data
Data Fields | ||
---|---|---|
rm_freertos_plus_fat_event_t | event | The event can be used to identify what caused the callback. |
void * | p_context | Placeholder for user data. |
struct rm_freertos_plus_fat_device_t |
struct rm_freertos_plus_fat_info_t |
Basic information about a FAT volume.
Data Fields | ||
---|---|---|
uint32_t | sector_size | Sector size. |
uint32_t | sectors_per_cluster | Sectors per cluster. |
uint32_t | total_sectors | Total number of sectors. |
uint32_t | free_sectors | Current free sectors. |
uint8_t * | p_volume_label | Volume label. |
rm_freertos_plus_fat_type_t | type | FAT type for this disk. |
uint8_t | partition_number | Partition number for this disk. |
struct rm_freertos_plus_fat_cfg_t |
FreeRTOS+FAT configuration structure.
Data Fields | |
void(* | p_callback )(rm_freertos_plus_fat_callback_args_t *p_args) |
Pointer to callback function. | |
void * | p_context |
User defined context passed into callback function. | |
fsp_err_t(* | p_busy_callback )(void *p_busy_context) |
void * | p_busy_context |
User defined context passed into busy callback function. | |
void const * | p_extend |
Extension parameter for hardware specific settings. | |
fsp_err_t(* rm_freertos_plus_fat_cfg_t::p_busy_callback) (void *p_busy_context) |
The busy callback function is called when the device is busy with a write or erase operation. It can be used to pend the current thread while waiting for the operation to complete and to manage timeouts if required. Set to NULL if pending the thread is not required and the thread will block waiting for the device busy status to clear. If this function returns an error (anything except FSP_SUCCESS), the upper layer function returns FF_ERR_IOMAN_DRIVER_FATAL_ERROR.
struct rm_freertos_plus_fat_disk_cfg_t |
Initializing a FAT disk.
Data Fields | ||
---|---|---|
rm_freertos_plus_fat_device_t | device | Device sector data. |
uint32_t | cache_size_bytes | Chache memory size. |
uint8_t * | p_cache | Pointer to cache memory. |
uint8_t | partition_number | Partition number for this disk. |
struct rm_freertos_plus_fat_api_t |
FreeRTOS+FAT functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(rm_freertos_plus_fat_ctrl_t *const p_ctrl, rm_freertos_plus_fat_cfg_t const *const p_cfg) |
fsp_err_t(* | mediaInit )(rm_freertos_plus_fat_ctrl_t *const p_ctrl, rm_freertos_plus_fat_device_t *const p_device) |
fsp_err_t(* | diskInit )(rm_freertos_plus_fat_ctrl_t *const p_ctrl, rm_freertos_plus_fat_disk_cfg_t const *const p_disk_cfg, FF_Disk_t *const p_disk) |
fsp_err_t(* | diskDeinit )(rm_freertos_plus_fat_ctrl_t *const p_ctrl, FF_Disk_t *const p_disk) |
fsp_err_t(* | infoGet )(rm_freertos_plus_fat_ctrl_t *const p_ctrl, FF_Disk_t *const p_disk, rm_freertos_plus_fat_info_t *const p_info) |
fsp_err_t(* | close )(rm_freertos_plus_fat_ctrl_t *const p_ctrl) |
fsp_err_t(* rm_freertos_plus_fat_api_t::open) (rm_freertos_plus_fat_ctrl_t *const p_ctrl, rm_freertos_plus_fat_cfg_t const *const p_cfg) |
Open media device.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure. |
fsp_err_t(* rm_freertos_plus_fat_api_t::mediaInit) (rm_freertos_plus_fat_ctrl_t *const p_ctrl, rm_freertos_plus_fat_device_t *const p_device) |
Initializes a media device. If the device is removable, it must be plugged in prior to calling this API. This function blocks until media initialization is complete.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_device | Pointer to store device information. |
fsp_err_t(* rm_freertos_plus_fat_api_t::diskInit) (rm_freertos_plus_fat_ctrl_t *const p_ctrl, rm_freertos_plus_fat_disk_cfg_t const *const p_disk_cfg, FF_Disk_t *const p_disk) |
Initializes a FreeRTOS+FAT FF_Disk_t structure.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_disk_cfg | Pointer to disk configurations |
[out] | p_disk | Pointer to store FreeRTOS+FAT disk structure. |
fsp_err_t(* rm_freertos_plus_fat_api_t::diskDeinit) (rm_freertos_plus_fat_ctrl_t *const p_ctrl, FF_Disk_t *const p_disk) |
Deinitializes a FreeRTOS+FAT FF_Disk_t structure.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_disk_cfg | Pointer to disk configurations |
[out] | p_disk | Pointer to store FreeRTOS+FAT disk structure. |
fsp_err_t(* rm_freertos_plus_fat_api_t::infoGet) (rm_freertos_plus_fat_ctrl_t *const p_ctrl, FF_Disk_t *const p_disk, rm_freertos_plus_fat_info_t *const p_info) |
Returns information about the media device.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_info | Pointer to information structure. All elements of this structure will be set by the function. |
fsp_err_t(* rm_freertos_plus_fat_api_t::close) (rm_freertos_plus_fat_ctrl_t *const p_ctrl) |
Close media device.
[in] | p_ctrl | Pointer to control structure. |
struct rm_freertos_plus_fat_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
rm_freertos_plus_fat_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
rm_freertos_plus_fat_cfg_t const *const |
p_cfg | Pointer to the configuration structure for this instance. |
rm_freertos_plus_fat_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void rm_freertos_plus_fat_ctrl_t |
FreeRTOS+FAT control structure
Events that can trigger a callback function