RTEMS  5.0.0
Functions

Functions

ALT_STATUS_CODE alt_qspi_read (void *dest, uint32_t src, size_t size)
 
ALT_STATUS_CODE alt_qspi_write (uint32_t dest, const void *src, size_t size)
 

Detailed Description

The functions in this group provide general purpose block read and write flash functions.

Function Documentation

◆ alt_qspi_read()

ALT_STATUS_CODE alt_qspi_read ( void *  dest,
uint32_t  src,
size_t  size 
)

Read a block of data from the specified flash address.

Reads a block of n data bytes from the flash src address into the user supplied dest buffer. The memory address, flash address, and size must be word aligned.

Parameters
destThe address of a caller supplied destination buffer large enough to contain the requested block of flash data.
srcThe flash device address to start reading data from.
sizeThe requested number of data bytes to read from the flash device.
Return values
ALT_E_SUCCESSIndicates successful completion.
ALT_E_ERRORIndicates an error occurred.

◆ alt_qspi_write()

ALT_STATUS_CODE alt_qspi_write ( uint32_t  dest,
const void *  src,
size_t  size 
)

Write a block of data to the specified flash address.

Writes a block of n data bytes to the flash dest address from the designated src buffer. The applicable destination flash address range should have been erased prior to calling this function. The flash address, memory address, and size must be word aligned.

Parameters
destThe destination flash address to begin writing data to.
srcThe source address to start writing data from.
sizeThe requested number of data bytes to write to the flash device.
Return values
ALT_E_SUCCESSIndicates successful completion.
ALT_E_ERRORIndicates an error occurred.