1.1.8.4.11 DRV_SFDP_ReadStatus Function

1.1.8.4.11 C

bool DRV_SFDP_ReadStatus( const DRV_HANDLE handle, void *rx_data, uint32_t rx_data_length );

1.1.8.4.11 Summary

Reads the status register of the Flash device.

1.1.8.4.11 Description

This function schedules a blocking operation for reading the Flash device's status register. The status register contains information about the device's current operational state.

1.1.8.4.11 Precondition

The DRV_SFDP_Open() routine must have been called for the specified SFDP driver instance.

1.1.8.4.11 Parameters

ParametersDescription
handleA valid open-instance handle, returned from the driver's open routine
*rx_dataBuffer pointer into which the status register data will be placed
rx_data_lengthNumber of bytes to read from the status register

1.1.8.4.11 Returns

True - If the status register read is successfully completed.

False - If read status command fails.

1.1.8.4.11 Example

DRV_HANDLE handle; // Returned from DRV_SFDP_Open
uint8_t statusRegister = 0;

if (DRV_SFDP_ReadStatus(handle, (void *)&statusRegister, sizeof(statusRegister)) == false)
{
    // Error handling here
}

1.1.8.4.11 Remarks

This function can be used to poll the device's ready status or other operational flags.