This API can be used to Read/write to a flash register.
Note: This API can only be used for one flash at a time.
Prototype
u32 XSfl_FlashRegisterReadWrite(XSfl_Interface *SflInstnacePtr, u8 *RxBfrPtr, u8 *TxBfrPtr, u32 *CmdBufferPtr, u8 Addrvalid);
Parameters
The following table lists the XSfl_FlashRegisterReadWrite function arguments.
| Type | Name | Description |
|---|---|---|
| XSfl_Interface | SflInstancePtr | is a pointer to the interface driver component to use. |
| u8 * | RxBfrPtr | is the pointer to store the read value from flash. |
| u8 * | TxBfrPtr | is the pointer to value to be written into flash. |
| u32 * | CmdBufferPtr | is the pointer that holds command, address and dummy. |
| u8 | Addrvalid | defines the specific read/write requires address or not. |
Returns
- XST_SUCCESS if successful
- XST_FAILURE - In case of failure