S32 SDK
lpspi_hal.c File Reference
#include "lpspi_hal.h"

Go to the source code of this file.

Functions

void LPSPI_HAL_Init (LPSPI_Type *base)
 Resets the LPSPI internal logic and registers to their default settings. More...
 
status_t LPSPI_HAL_Config (LPSPI_Type *base, const lpspi_init_config_t *config, lpspi_tx_cmd_config_t *txCmdCfgSet, uint32_t *actualBaudRate)
 Configures the LPSPI registers to a user defined configuration. More...
 
void LPSPI_HAL_GetVersionId (const LPSPI_Type *base, uint32_t *major, uint32_t *minor, uint32_t *feature)
 Gets the Major, Minor and Feature ID of the LPSPI module. More...
 
status_t LPSPI_HAL_Disable (LPSPI_Type *base)
 Disables the LPSPI module. More...
 
status_t LPSPI_HAL_SetMasterSlaveMode (LPSPI_Type *base, lpspi_master_slave_mode_t mode)
 Configures the LPSPI for master or slave. More...
 
void LPSPI_HAL_GetFifoSizes (const LPSPI_Type *base, uint8_t *txFifoSize, uint8_t *rxFifoSize)
 Gets the TX and RX FIFO sizes of the LPSPI module. More...
 
void LPSPI_HAL_SetFlushFifoCmd (LPSPI_Type *base, bool flushTxFifo, bool flushRxFifo)
 Flushes the LPSPI FIFOs. More...
 
status_t LPSPI_HAL_ClearStatusFlag (LPSPI_Type *base, lpspi_status_flag_t statusFlag)
 Clears the LPSPI status flag. More...
 
void LPSPI_HAL_SetHostRequestMode (LPSPI_Type *base, lpspi_host_request_select_t hostReqInput, lpspi_signal_polarity_t hostReqPol, bool enable)
 Configures the LPSPI Host Request input. More...
 
status_t LPSPI_HAL_SetPcsPolarityMode (LPSPI_Type *base, lpspi_which_pcs_t whichPcs, lpspi_signal_polarity_t pcsPolarity)
 Configures the desired LPSPI PCS polarity. More...
 
status_t LPSPI_HAL_SetMatchConfigMode (LPSPI_Type *base, lpspi_match_config_t matchCondition, bool rxDataMatchOnly, uint32_t match0, uint32_t match1)
 Configures the LPSPI data match configuration mode. More...
 
status_t LPSPI_HAL_SetPinConfigMode (LPSPI_Type *base, lpspi_pin_config_t pinCfg, lpspi_data_out_config_t dataOutConfig, bool pcs3and2Enable)
 Configures the LPSPI SDO/SDI pin configuration mode. More...
 
uint32_t LPSPI_HAL_SetBaudRate (LPSPI_Type *base, uint32_t bitsPerSec, uint32_t sourceClockInHz, uint32_t *tcrPrescaleValue)
 Sets the LPSPI baud rate in bits per second. More...
 
status_t LPSPI_HAL_SetBaudRateDivisor (LPSPI_Type *base, uint32_t divisor)
 Configures the baud rate divisor manually (only the LPSPI_CCR[SCKDIV]). More...
 
status_t LPSPI_HAL_SetDelay (LPSPI_Type *base, lpspi_delay_type_t whichDelay, uint32_t delay)
 Manually configures a specific LPSPI delay parameter (module must be disabled to change the delay values). More...
 
void LPSPI_HAL_SetTxCommandReg (LPSPI_Type *base, const lpspi_tx_cmd_config_t *txCmdCfgSet)
 Sets the Transmit Command Register (TCR) parameters. More...
 
void LPSPI_HAL_WriteDataBlocking (LPSPI_Type *base, uint32_t data)
 Writes a data into the TX data buffer and waits till complete to return. More...
 
uint32_t LPSPI_HAL_ReadDataBlocking (const LPSPI_Type *base)
 Reads data from the data buffer but first waits till data is ready. More...