QSPI Driver API/interface file.
Go to the source code of this file.
Data Structures | |
struct | QSPI_Transaction |
Data structure used with QSPI_Transfers - QSPI_writeConfigMode, QSPI_readMemMapMode. More... | |
struct | QSPI_ReadCmdParams |
struct | QSPI_WriteCmdParams |
struct | QSPI_Params |
QSPI Parameters. More... | |
struct | QSPI_EdmaParams |
QSPI EDMA Parameters. More... | |
struct | QSPI_Object |
QSPI driver object. More... | |
struct | QSPI_Attrs |
QSPI instance attributes - used during init time. More... | |
struct | QSPI_Config |
Macros | |
Chip Selects | |
#define | QSPI_CS0 (0U) |
#define | QSPI_CS1 (1U) |
#define | QSPI_CS2 (2U) |
#define | QSPI_CS3 (3U) |
Macros for invalid commands | |
#define | QSPI_CMD_INVALID_OPCODE (0xFFU) |
#define | QSPI_CMD_INVALID_ADDR (0xFFFFFFFFU) |
Transfer Status Code | |
#define | QSPI_TRANSFER_COMPLETED (0U) |
#define | QSPI_TRANSFER_STARTED (1U) |
#define | QSPI_TRANSFER_CANCELLED (2U) |
#define | QSPI_TRANSFER_FAILED (3U) |
#define | QSPI_TRANSFER_CSN_DEASSERT (4U) |
#define | QSPI_TRANSFER_TIMEOUT (5U) |
Transfer Lines Number | |
#define | QSPI_RX_LINES_SINGLE (0U) |
#define | QSPI_RX_LINES_DUAL (1U) |
#define | QSPI_RX_LINES_QUAD (2U) |
Frame Format | |
#define | QSPI_FF_POL0_PHA0 |
#define | QSPI_FF_POL0_PHA1 |
#define | QSPI_FF_POL1_PHA0 |
#define | QSPI_FF_POL1_PHA1 |
Chip select polarity | |
#define | QSPI_CS_POL_ACTIVE_LOW (CSL_QSPI_SPI_DC_REG_CSP0_ACTIVE_LOW) |
#define | QSPI_CS_POL_ACTIVE_HIGH (CSL_QSPI_SPI_DC_REG_CSP0_ACTIVE_HIGH) |
Data Delay | |
#define | QSPI_DATA_DELAY_0 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_0) |
#define | QSPI_DATA_DELAY_1 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_1) |
#define | QSPI_DATA_DELAY_2 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_2) |
#define | QSPI_DATA_DELAY_3 (CSL_QSPI_SPI_DC_REG_DD0_CS_TO_DATA_DELAY_3) |
Typedefs | |
typedef void * | QSPI_Handle |
A handle that is returned from a QSPI_open() call. More... | |
Functions | |
void | QSPI_init (void) |
This function initializes the QSPI module. More... | |
void | QSPI_deinit (void) |
This function de-initializes the QSPI module. More... | |
void | QSPI_Params_init (QSPI_Params *qspiParams) |
Initialize data structure with defaults. More... | |
QSPI_Handle | QSPI_open (uint32_t index, const QSPI_Params *openParams) |
This function opens a given QSPI peripheral. More... | |
void | QSPI_close (QSPI_Handle handle) |
Function to close a QSPI peripheral specified by the QSPI handle. More... | |
QSPI_Handle | QSPI_getHandle (uint32_t index) |
This function returns the handle of an open QSPI Instance from the instance index. More... | |
void | QSPI_transaction_init (QSPI_Transaction *trans) |
Function to initialize the QSPI_Transaction structure. More... | |
void | QSPI_readCmdParams_init (QSPI_ReadCmdParams *rdParams) |
Function to initialize the QSPI_Transaction structure. More... | |
void | QSPI_writeCmdParams_init (QSPI_WriteCmdParams *wrParams) |
Function to initialize the QSPI_Transaction structure. More... | |
int32_t | QSPI_readCmd (QSPI_Handle handle, QSPI_ReadCmdParams *rdParams) |
Function to send specific commands and receive related data from flash. More... | |
int32_t | QSPI_writeCmd (QSPI_Handle handle, QSPI_WriteCmdParams *wrParams) |
Function to send specific commands and related data to flash. More... | |
int32_t | QSPI_setWriteCmd (QSPI_Handle handle, uint8_t command) |
Function to set write command to be used. More... | |
int32_t | QSPI_setReadCmd (QSPI_Handle handle, uint8_t command) |
Function to set read command to be used. More... | |
int32_t | QSPI_setAddressByteCount (QSPI_Handle handle, uint32_t count) |
Function to set number of address bytes to be used. More... | |
int32_t | QSPI_setDummyBitCount (QSPI_Handle handle, uint32_t count) |
Function to set number of dummy bits to be used. More... | |
int32_t | QSPI_setMemAddrSpace (QSPI_Handle handle, uint32_t memMappedPortSwitch) |
This function is used to switch between memory mapped and configuration mode. More... | |
int32_t | QSPI_intEnable (QSPI_Handle handle, uint32_t intFlag) |
This function is used to enable word or frame complete interrupt. More... | |
int32_t | QSPI_intDisable (QSPI_Handle handle, uint32_t intFlag) |
This function is used to disable word or frame complete interrupt. More... | |
int32_t | QSPI_intClear (QSPI_Handle handle, uint32_t intFlag) |
This function is used to clear word or frame complete interrupt. More... | |
int32_t | QSPI_setPreScaler (QSPI_Handle handle, uint32_t clkDividerVal) |
Set the QSPI clock register divider value. More... | |
void | OSPI_phyGetTuningData (uint32_t *tuningData, uint32_t *tuningDataSize) |
Different QSPI Transfer functions | |
int32_t | QSPI_readMemMapMode (QSPI_Handle handle, QSPI_Transaction *trans) |
Function to perform reads from the flash in memory mapped mode. More... | |
int32_t | QSPI_writeConfigMode (QSPI_Handle handle, QSPI_Transaction *trans) |
Function to perform writes to the flash in configuration mode. More... | |
Variables | |
QSPI_Config | gQspiConfig [] |
Externally defined driver configuration array. More... | |
uint32_t | gQspiConfigNum |
Externally defined driver configuration array size. More... | |