Synergy Software Package User's Manual

FileX adaptation layer for block media device drivers. More...

Data Structures

struct  sf_el_fx_media_partition_data_info_t
 
struct  sf_el_fx_media_mbr_info_t
 
struct  sf_el_fx_media_ebr_info_t
 
struct  sf_el_fx_media_boot_record_table_info_t
 
struct  sf_el_fx_media_global_open_info_t
 
struct  sf_el_fx_media_partition_info_t
 
struct  sf_el_fx_media_info_t
 
struct  sf_el_fx_callback_args_t
 
struct  sf_el_fx_config_t
 
struct  sf_el_fx_instance_ctrl_t
 
struct  sf_el_fx_t
 

Macros

#define SF_EL_FX_API_VERSION_MAJOR   (2)
 
#define SF_EL_FX_CODE_VERSION_MAJOR   (2U)
 
#define SF_EL_FX_55AA_SIGNATURE_OFFSET   (0x1FEU)
 
#define SF_EL_FX_OPEN   (0x4649584FU)
 

Enumerations

enum  sf_el_fx_media_partition_table_update_status_t { SF_EL_FX_PARTITION_TABLE_UPDATE_DISABLE = 0U, SF_EL_FX_PARTITION_TABLE_UPDATE_ENABLE = 1U }
 
enum  sf_el_fx_media_partition_exist_status_t { SF_EL_FX_NO_PARTITIONS = 0U, SF_EL_FX_MULTIPLE_PARTITIONS = 1U }
 
enum  sf_el_fx_media_partition_type_t {
  SF_EL_FX_PARTITION_TYPE_UNKNOWN = 0x00U, SF_EL_FX_PARTITION_TYPE_FAT_16_MEMORY_LESS_THAN_32MB = 0x04U, SF_EL_FX_PARTITION_TYPE_EXTENDED = 0x05U, SF_EL_FX_PARTITION_TYPE_FAT_16_MEMORY_MORE_THAN_32MB = 0x06U,
  SF_EL_FX_PARTITION_TYPE_EXFAT = 0x07U, SF_EL_FX_PARTITION_TYPE_FAT_32 = 0x0BU, SF_EL_FX_PARTITION_TYPE_EXTENDED_INT13 = 0x0FU
}
 
enum  sf_el_fx_media_init_status_t { SF_EL_FX_SYS_UNINIT = 0U, SF_EL_FX_SYS_INIT_PARTIAL = 1U, SF_EL_FX_SYS_INIT_FULL = 2U }
 
enum  sf_el_fx_media_mbr_ebr_status_t { SF_EL_FX_DONOT_EXIST_OR_INVALID = 0x00U, SF_EL_FX_EXIST_AND_VALID = 0x01U }
 
enum  sf_el_fx_media_partition_global_open_status_t { SF_EL_FX_PARTITION_GLOBAL_CLOSE = 0U, SF_EL_FX_PARTITION_GLOBAL_OPEN = 1U }
 
enum  sf_el_fx_media_partition_open_status_t { SF_EL_FX_PARTITION_CLOSE = 0U, SF_EL_FX_PARTITION_OPEN = 1U }
 
enum  sf_el_fx_media_partition_format_status_t { SF_EL_FX_PARTITION_UNFORMATED = 0U, SF_EL_FX_PARTITION_PRE_RESET_FORMATED = 1U, SF_EL_FX_PARTITION_POST_RESET_FORMATED = 2U }
 
enum  sf_el_fx_media_partition_ebr_buff_update_t { SF_EL_FX_EBR_BUFF_UPDATE_PRESENT = 0U, SF_EL_FX_EBR_BUFF_UPDATE_NEXT = 1U }
 

Functions

void SF_EL_FX_BlockDriver (FX_MEDIA *p_fx_media)
 Access Block Media device functions open, close, read, write and control. More...
 

Detailed Description

FileX adaptation layer for block media device drivers.

SF_EL_FX FileX I/O is a single entry function which adapts FileX to Renesas Synergy block media device drivers.

Summary

SF_EL_FX Has no API file.

Macro Definition Documentation

◆ SF_EL_FX_55AA_SIGNATURE_OFFSET

#define SF_EL_FX_55AA_SIGNATURE_OFFSET   (0x1FEU)

SSP FileX Support.

◆ SF_EL_FX_API_VERSION_MAJOR

#define SF_EL_FX_API_VERSION_MAJOR   (2)

Version of the API defined in this file

◆ SF_EL_FX_CODE_VERSION_MAJOR

#define SF_EL_FX_CODE_VERSION_MAJOR   (2U)

Version of code that implements the API defined in this file

◆ SF_EL_FX_OPEN

#define SF_EL_FX_OPEN   (0x4649584FU)

"FIXO" in ASCII. Used to determine if the control block is open.

Enumeration Type Documentation

◆ sf_el_fx_media_init_status_t

Media initialization status

Enumerator
SF_EL_FX_SYS_UNINIT 

System not initialized.

SF_EL_FX_SYS_INIT_PARTIAL 

System partial initialized.

SF_EL_FX_SYS_INIT_FULL 

System full initialized.

◆ sf_el_fx_media_mbr_ebr_status_t

Media MBR/EBR table status

Enumerator
SF_EL_FX_DONOT_EXIST_OR_INVALID 

MBR/EBR table do not exist or is invalid.

SF_EL_FX_EXIST_AND_VALID 

MBT/EBR table is valid.

◆ sf_el_fx_media_partition_ebr_buff_update_t

Media partition EBR buffer update

Enumerator
SF_EL_FX_EBR_BUFF_UPDATE_PRESENT 

Update present EBR table.

SF_EL_FX_EBR_BUFF_UPDATE_NEXT 

Update next EBR table.

◆ sf_el_fx_media_partition_exist_status_t

Media partition exist status

Enumerator
SF_EL_FX_NO_PARTITIONS 

No partition in memory.

SF_EL_FX_MULTIPLE_PARTITIONS 

Multiple partitions in memory.

◆ sf_el_fx_media_partition_format_status_t

Media partition format status

Enumerator
SF_EL_FX_PARTITION_UNFORMATED 

Partition is not formated.

SF_EL_FX_PARTITION_PRE_RESET_FORMATED 

Partition exist before reset of the system.

SF_EL_FX_PARTITION_POST_RESET_FORMATED 

Partition created after system reset.

◆ sf_el_fx_media_partition_global_open_status_t

Media partition global open status

Enumerator
SF_EL_FX_PARTITION_GLOBAL_CLOSE 

All partitions are closed.

SF_EL_FX_PARTITION_GLOBAL_OPEN 

At least one partition is open.

◆ sf_el_fx_media_partition_open_status_t

Media partition open status

Enumerator
SF_EL_FX_PARTITION_CLOSE 

Partition is close.

SF_EL_FX_PARTITION_OPEN 

Partition is open.

◆ sf_el_fx_media_partition_table_update_status_t

Block Media Control Block Type Media partition table update status

Enumerator
SF_EL_FX_PARTITION_TABLE_UPDATE_DISABLE 

Partition table update is disabled.

SF_EL_FX_PARTITION_TABLE_UPDATE_ENABLE 

Partition table update is enabled.

◆ sf_el_fx_media_partition_type_t

Media partition types

Enumerator
SF_EL_FX_PARTITION_TYPE_UNKNOWN 

Partition type unknown.

SF_EL_FX_PARTITION_TYPE_FAT_16_MEMORY_LESS_THAN_32MB 

Partition type fat16 with size less than 32 MB.

SF_EL_FX_PARTITION_TYPE_EXTENDED 

Partition type extended.

SF_EL_FX_PARTITION_TYPE_FAT_16_MEMORY_MORE_THAN_32MB 

Partition type fat16 with size more than 32 MB.

SF_EL_FX_PARTITION_TYPE_EXFAT 

Partition type exFAT.

SF_EL_FX_PARTITION_TYPE_FAT_32 

Partition type fat32.

SF_EL_FX_PARTITION_TYPE_EXTENDED_INT13 

Partition type extended with interrupt 13.

Function Documentation

◆ SF_EL_FX_BlockDriver()

void SF_EL_FX_BlockDriver ( FX_MEDIA *  p_fx_media)

Access Block Media device functions open, close, read, write and control.

The file system relies on the media to be formatted prior to creating directories and files The sector size and sector count will change depending on the media type and size.

The File Allocation Table (FAT) starts after the reserved sectors in the media. The FAT area is basically an array of 12-bit, 16-bit, or 32-bit entries that determine if that cluster is allocated or part of a chain of clusters comprising a subdirectory or a file. The size of each FAT entry is determined by the number of clusters that need to be represented. If the number of clusters (derived from the total sectors divided by the sectors per cluster) is less than 4,086, 12-bit FAT entries are used. If the total number of clusters is greater than 4,086 and less than or equal to 65,525, 16-bit FAT entries are used. Otherwise, if the total number of clusters is greater than 65,525, 32-bit FAT entries are used. The SF_EL_FX_BlockDriver function is called from the FileX file system driver and issues requests to a Block Media device through the Synergy Block Media Interface. Uses block media driver for accesses.

Parameters
[in,out]p_fx_mediaFileX media control block. All information about each open media device are maintained in by the FX_MEDIA data type. The I/O driver communicates the success or failure of the request through the fx_media_driver_status member of FX_MEDIA (p_fx_media->fx_media_driver_status). Possible values are documented in the FileX User Guide.
Return values
none.
Note
This function returns nothing, but updates FileX media control block.This function calls sf_el_fx_driver_request_handler

Initialize FileX I/O status to error. It will change to FX_SUCCESS unless an operation fails.

Pass control to sf_el_fx_driver_request_handler, which is responsible for setting FX_MEDIA::fx_media_driver_status in-case of any failure.

  • Update FX_MEDIA::fx_media_driver_status to FX_SUCCESS on successful driver request.