iLLD_TC27xC  1.0
Module Functions
Collaboration diagram for Module Functions:

Functions

IFX_EXTERN void IfxQspi_SpiMaster_initModule (IfxQspi_SpiMaster *handle, const IfxQspi_SpiMaster_Config *config)
 Initialises the module. More...
 
IFX_EXTERN void IfxQspi_SpiMaster_initModuleConfig (IfxQspi_SpiMaster_Config *config, Ifx_QSPI *qspi)
 Fills the config structure with default values. More...
 

Detailed Description

Function Documentation

IFX_EXTERN void IfxQspi_SpiMaster_initModule ( IfxQspi_SpiMaster handle,
const IfxQspi_SpiMaster_Config config 
)

Initialises the module.

Parameters
handleModule handle
configPredefined configuration structure of the module
Returns
None

Configuration example for QSPI in master mode:

// create module config
IfxQspi_SpiMaster_Config spiMasterConfig;
IfxQspi_SpiMaster_initModuleConfig(&spiMasterConfig, &MODULE_QSPI0);
// set the desired mode and maximum baudrate
spiMasterConfig.base.mode = SpiIf_Mode_master;
spiMasterConfig.base.maximumBaudrate = 10000000;
// ISR priorities and interrupt target
spiMasterConfig.base.txPriority = IFX_INTPRIO_QSPI0_TX;
spiMasterConfig.base.rxPriority = IFX_INTPRIO_QSPI0_RX;
spiMasterConfig.base.erPriority = IFX_INTPRIO_QSPI0_ER;
// pin configuration
const IfxQspi_SpiMaster_Pins pins = {
};
spiMasterConfig.pins = &pins;
// initialize module
//IfxQspi_SpiMaster spi; // defined globally
IfxQspi_SpiMaster_initModule(&spi, &spiMasterConfig);

NOTE: If not DMA, the interrupt service provider is assigned to the CPU ID where this function is called from

Definition at line 262 of file IfxQspi_SpiMaster.c.

IFX_EXTERN void IfxQspi_SpiMaster_initModuleConfig ( IfxQspi_SpiMaster_Config config,
Ifx_QSPI *  qspi 
)

Fills the config structure with default values.

Parameters
configConfiguration structure which should be initialized.
qspipointer to QSPI registers
Returns
None

Usage example: see IfxQspi_SpiMaster_initModule

Definition at line 462 of file IfxQspi_SpiMaster.c.