M480 BSP V3.05.005
The Board Support Package for M480 Series
Macros | Functions
usci_spi.h File Reference

M480 series USCI_SPI driver header file. More...

Go to the source code of this file.

Macros

#define USPI_MODE_0
 
#define USPI_MODE_1
 
#define USPI_MODE_2
 
#define USPI_MODE_3
 
#define USPI_SLAVE
 
#define USPI_MASTER
 
#define USPI_SS
 
#define USPI_SS_ACTIVE_HIGH
 
#define USPI_SS_ACTIVE_LOW
 
#define USPI_SSINACT_INT_MASK
 
#define USPI_SSACT_INT_MASK
 
#define USPI_SLVTO_INT_MASK
 
#define USPI_SLVBE_INT_MASK
 
#define USPI_TXUDR_INT_MASK
 
#define USPI_RXOV_INT_MASK
 
#define USPI_TXST_INT_MASK
 
#define USPI_TXEND_INT_MASK
 
#define USPI_RXST_INT_MASK
 
#define USPI_RXEND_INT_MASK
 
#define USPI_BUSY_MASK
 
#define USPI_RX_EMPTY_MASK
 
#define USPI_RX_FULL_MASK
 
#define USPI_TX_EMPTY_MASK
 
#define USPI_TX_FULL_MASK
 
#define USPI_SSLINE_STS_MASK
 
#define USPI_DISABLE_3WIRE_MODE(uspi)
 Disable slave 3-wire mode. More...
 
#define USPI_ENABLE_3WIRE_MODE(uspi)
 Enable slave 3-wire mode. More...
 
#define USPI_GET_RX_EMPTY_FLAG(uspi)
 Get the Rx buffer empty flag. More...
 
#define USPI_GET_TX_EMPTY_FLAG(uspi)
 Get the Tx buffer empty flag. More...
 
#define USPI_GET_TX_FULL_FLAG(uspi)
 Get the Tx buffer full flag. More...
 
#define USPI_READ_RX(uspi)
 Get the datum read from RX register. More...
 
#define USPI_WRITE_TX(uspi, u32TxData)
 Write datum to TX register. More...
 
#define USPI_SET_SS_HIGH(uspi)
 Set USCI_SPI_SS pin to high state. More...
 
#define USPI_SET_SS_LOW(uspi)
 Set USCI_SPI_SS pin to low state. More...
 
#define USPI_SET_SUSPEND_CYCLE(uspi, u32SuspCycle)
 Set the length of suspend interval. More...
 
#define USPI_SET_LSB_FIRST(uspi)
 Set the USCI_SPI transfer sequence with LSB first. More...
 
#define USPI_SET_MSB_FIRST(uspi)
 Set the USCI_SPI transfer sequence with MSB first. More...
 
#define USPI_SET_DATA_WIDTH(uspi, u32Width)
 Set the data width of a USCI_SPI transaction. More...
 
#define USPI_IS_BUSY(uspi)
 Get the USCI_SPI busy state. More...
 
#define USPI_GET_WAKEUP_FLAG(uspi)
 Get the USCI_SPI wakeup flag. More...
 
#define USPI_CLR_WAKEUP_FLAG(uspi)
 Clear the USCI_SPI wakeup flag. More...
 
#define USPI_GET_PROT_STATUS(uspi)
 Get protocol interrupt flag/status. More...
 
#define USPI_CLR_PROT_INT_FLAG(uspi, u32IntTypeFlag)
 Clear specified protocol interrupt flag. More...
 
#define USPI_GET_BUF_STATUS(uspi)
 Get buffer interrupt flag/status. More...
 
#define USPI_CLR_BUF_INT_FLAG(uspi, u32IntTypeFlag)
 Clear specified buffer interrupt flag. More...
 
#define USPI_ENABLE_PROT_INT(uspi, u32IntSel)
 Enable specified protocol interrupt. More...
 
#define USPI_DISABLE_PROT_INT(uspi, u32IntSel)
 Disable specified protocol interrupt. More...
 
#define USPI_ENABLE_BUF_INT(uspi, u32IntSel)
 Enable specified buffer interrupt. More...
 
#define USPI_DISABLE_BUF_INT(uspi, u32IntSel)
 Disable specified buffer interrupt. More...
 
#define USPI_ENABLE_TRANS_INT(uspi, u32IntSel)
 Enable specified transfer interrupt. More...
 
#define USPI_DISABLE_TRANS_INT(uspi, u32IntSel)
 Disable specified transfer interrupt. More...
 
#define USPI_TRIGGER_RX_PDMA(uspi)
 Trigger RX PDMA function. More...
 
#define USPI_TRIGGER_TX_PDMA(uspi)
 Trigger TX PDMA function. More...
 
#define USPI_TRIGGER_TX_RX_PDMA(uspi)
 Trigger TX and RX PDMA function. More...
 
#define USPI_DISABLE_RX_PDMA(uspi)
 Disable RX PDMA transfer. More...
 
#define USPI_DISABLE_TX_PDMA(uspi)
 Disable TX PDMA transfer. More...
 
#define USPI_DISABLE_TX_RX_PDMA(uspi)
 Disable TX and RX PDMA transfer. More...
 

Functions

uint32_t USPI_Open (USPI_T *uspi, uint32_t u32MasterSlave, uint32_t u32SPIMode, uint32_t u32DataWidth, uint32_t u32BusClock)
 This function make USCI_SPI module be ready to transfer. By default, the USCI_SPI transfer sequence is MSB first, the slave selection signal is active low and the automatic slave select function is disabled. In Slave mode, the u32BusClock must be NULL and the USCI_SPI clock divider setting will be 0. More...
 
void USPI_Close (USPI_T *uspi)
 Disable USCI_SPI function mode. More...
 
void USPI_ClearRxBuf (USPI_T *uspi)
 Clear Rx buffer. More...
 
void USPI_ClearTxBuf (USPI_T *uspi)
 Clear Tx buffer. More...
 
void USPI_DisableAutoSS (USPI_T *uspi)
 Disable the automatic slave select function. More...
 
void USPI_EnableAutoSS (USPI_T *uspi, uint32_t u32SSPinMask, uint32_t u32ActiveLevel)
 Enable the automatic slave select function. Only available in Master mode. More...
 
uint32_t USPI_SetBusClock (USPI_T *uspi, uint32_t u32BusClock)
 Set the USCI_SPI bus clock. Only available in Master mode. More...
 
uint32_t USPI_GetBusClock (USPI_T *uspi)
 Get the actual frequency of USCI_SPI bus clock. Only available in Master mode. More...
 
void USPI_EnableInt (USPI_T *uspi, uint32_t u32Mask)
 Enable related interrupts specified by u32Mask parameter. More...
 
void USPI_DisableInt (USPI_T *uspi, uint32_t u32Mask)
 Disable related interrupts specified by u32Mask parameter. More...
 
uint32_t USPI_GetIntFlag (USPI_T *uspi, uint32_t u32Mask)
 Get interrupt flag. More...
 
void USPI_ClearIntFlag (USPI_T *uspi, uint32_t u32Mask)
 Clear interrupt flag. More...
 
uint32_t USPI_GetStatus (USPI_T *uspi, uint32_t u32Mask)
 Get USCI_SPI status. More...
 
void USPI_EnableWakeup (USPI_T *uspi)
 Enable USCI_SPI Wake-up Function. More...
 
void USPI_DisableWakeup (USPI_T *uspi)
 Disable USCI_SPI Wake-up Function. More...
 

Detailed Description

M480 series USCI_SPI driver header file.

Version
V3.00

SPDX-License-Identifier: Apache-2.0

Definition in file usci_spi.h.