RTEMS 7.0-rc1
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
Generic Flash Parsers

SFDP and CFI parsers. More...

Data Structures

struct  rtems_flash_NOR_config_data
 This struct holds the information parsed from the Common Flash Memory Information (CFI) read from a flash chip. More...
 
struct  rtems_flash_NOR_config_accessor
 This struct allows access to the flash data. More...
 

Typedefs

typedef struct rtems_flash_NOR_config_data rtems_flash_NOR_config_data
 This struct holds the information parsed from the Common Flash Memory Information (CFI) read from a flash chip.
 
typedef uint8_t *(* rtems_flash_NOR_config_resource_acquire) (void *context, uint32_t offset, size_t length)
 acquire data from the NOR chip.
 
typedef void(* rtems_flash_NOR_config_resource_release) (void *context, uint8_t *data)
 release data acquired from the NOR chip.
 
typedef struct rtems_flash_NOR_config_accessor rtems_flash_NOR_config_accessor
 This struct allows access to the flash data.
 

Functions

rtems_status_code rtems_flash_CFI_parse_from_buffer (uint8_t *cfi_raw, size_t cfi_raw_len, rtems_flash_NOR_config_data *data)
 This function parses the provided buffer of CFI data into a rtems_flash_NOR_config_data structure.
 
rtems_status_code rtems_flash_SFDP_parse_from_buffer (uint8_t *sfdp_raw, size_t sfdp_raw_len, rtems_flash_NOR_config_data *data)
 This function parses the provided buffer of SFDP data into a rtems_flash_NOR_config_data structure.
 
rtems_status_code rtems_flash_SFDP_parse (rtems_flash_NOR_config_accessor *accessor, rtems_flash_NOR_config_data *data)
 This function parses a SFDP configuration space into a rtems_flash_NOR_config_data structure.
 

Detailed Description

SFDP and CFI parsers.

Typedef Documentation

◆ rtems_flash_NOR_config_resource_acquire

typedef uint8_t *(* rtems_flash_NOR_config_resource_acquire) (void *context, uint32_t offset, size_t length)

acquire data from the NOR chip.

Parameters
[in]contextThe context data used to retrieve bytes.
[in]offsetThe offset to read from the flash begin in bytes.
[in]lengthThe size of the buffer in bytes.
Return values
NULLon failure.
pointerto the requested data on success.

◆ rtems_flash_NOR_config_resource_release

typedef void(* rtems_flash_NOR_config_resource_release) (void *context, uint8_t *data)

release data acquired from the NOR chip.

Parameters
[in]contextThe context data used to retrieve bytes.
[in]dataThe data previously acquired.

Function Documentation

◆ rtems_flash_CFI_parse_from_buffer()

rtems_status_code rtems_flash_CFI_parse_from_buffer ( uint8_t *  cfi_raw,
size_t  cfi_raw_len,
rtems_flash_NOR_config_data data 
)

This function parses the provided buffer of CFI data into a rtems_flash_NOR_config_data structure.

Parameters
cfi_rawis a buffer containing CFI data.
cfi_raw_lenis the length of the data in cfi_raw.
datais a pointer to a rtems_flash_NOR_config_data struct to be filled with data about the flash chip.
Returns
RTEMS_SUCCESSFUL if successful.

◆ rtems_flash_SFDP_parse()

rtems_status_code rtems_flash_SFDP_parse ( rtems_flash_NOR_config_accessor accessor,
rtems_flash_NOR_config_data data 
)

This function parses a SFDP configuration space into a rtems_flash_NOR_config_data structure.

Parameters
accessoris the accessor for the SFDP configuration space.
datais a pointer to a NOR_config_data struct to be filled with data about the flash chip.
Returns
RTEMS_SUCCESSFUL if successful.

◆ rtems_flash_SFDP_parse_from_buffer()

rtems_status_code rtems_flash_SFDP_parse_from_buffer ( uint8_t *  sfdp_raw,
size_t  sfdp_raw_len,
rtems_flash_NOR_config_data data 
)

This function parses the provided buffer of SFDP data into a rtems_flash_NOR_config_data structure.

Parameters
sfdp_rawis a buffer containing SFDP data.
sfdp_raw_lenis the length of the data in sfdp_raw.
datais a pointer to a rtems_flash_NOR_config_data struct to be filled with data about the flash chip.
Returns
RTEMS_SUCCESSFUL if successful.