RA Flexible Software Package Documentation  Release v5.2.0

 
FreeRTOS+FAT Port Interface

Detailed Description

Interface for FreeRTOS+FAT port.

Summary

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_api_t
 
struct  rm_freertos_plus_fat_instance_t
 

Enumerations

enum  rm_freertos_plus_fat_event_t
 
enum  rm_freertos_plus_fat_type_t
 

Data Structure Documentation

◆ rm_freertos_plus_fat_callback_args_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 const * p_context Placeholder for user data.

◆ rm_freertos_plus_fat_device_t

struct rm_freertos_plus_fat_device_t

Information obtained from the media device.

Data Fields
uint32_t sector_count Sector count.
uint32_t sector_size_bytes Sector size in bytes.

◆ rm_freertos_plus_fat_api_t

struct rm_freertos_plus_fat_api_t

FreeRTOS plus 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)
 

Field Documentation

◆ open

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.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to configuration structure.

◆ mediaInit

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.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_devicePointer to store device information.

◆ diskInit

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.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_disk_cfgPointer to disk configurations
[out]p_diskPointer to store FreeRTOS+FAT disk structure.

◆ diskDeinit

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.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_disk_cfgPointer to disk configurations
[out]p_diskPointer to store FreeRTOS+FAT disk structure.

◆ infoGet

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.

Parameters
[in]p_ctrlPointer to control structure.
[out]p_infoPointer to information structure. All elements of this structure will be set by the function.

◆ close

fsp_err_t(* rm_freertos_plus_fat_api_t::close) (rm_freertos_plus_fat_ctrl_t *const p_ctrl)

Close media device.

Parameters
[in]p_ctrlPointer to control structure.

◆ rm_freertos_plus_fat_instance_t

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.

Enumeration Type Documentation

◆ rm_freertos_plus_fat_event_t

Events that can trigger a callback function

Enumerator
RM_FREERTOS_PLUS_FAT_EVENT_MEDIA_REMOVED 

Media removed event.

RM_FREERTOS_PLUS_FAT_EVENT_MEDIA_INSERTED 

Media inserted event.

RM_FREERTOS_PLUS_FAT_EVENT_MEDIA_SUSPEND 

Media suspended event.

RM_FREERTOS_PLUS_FAT_EVENT_MEDIA_RESUME 

Media resumed event.

◆ rm_freertos_plus_fat_type_t

Enumerator
RM_FREERTOS_PLUS_FAT_TYPE_FAT32 

FAT32 disk.

RM_FREERTOS_PLUS_FAT_TYPE_FAT16 

FAT16 disk.

RM_FREERTOS_PLUS_FAT_TYPE_FAT12 

FAT12 disk.