DRV_SST38_Read Function

C

bool DRV_SST38_Read( const DRV_HANDLE handle, void *rx_data, uint32_t rx_data_length, uint32_t address )

Summary

Reads n bytes of data from the specified start address of flash memory.

Description

This function schedules a blocking operation for reading requested number of data bytes from the flash memory.

Preconditions

The DRV_SST38_Open() routine must have been called for the specified SST38 driver instance.

Parameters

ParamDescription
handleA valid open-instance handle, returned from the driver's open routine
rx_dataBuffer pointer into which the data read from the SST38 Flash memory will be placed
rx_data_lengthTotal number of bytes to be read
addressRead memory start address from where the data should be read

Returns

  • true - if number of bytes requested are read from flash memory.

  • false - if read command itself fails.

Example

#define BUFFER_SIZE  1024
#define MEM_ADDRESS  0x0

DRV_HANDLE handle;
uint8_t CACHE_ALIGN readBuffer[BUFFER_SIZE];

if (DRV_SST38_Read(handle, (void *)&readBuffer, BUFFER_SIZE, MEM_ADDRESS) == false)
{
    printf("Error handling here");
}

Remarks

None.