CC26xx Driver Library
spi.c File Reference
#include "spi.h"

Functions

void SPIConfigSetExpClk (uint32_t ui32Base, uint32_t ui32SPIClk, uint32_t ui32Protocol, uint32_t ui32Mode, uint32_t ui32BitRate, uint32_t ui32DataWidth)
 Configures the serial peripheral port. More...
 
int32_t SPIDataPutNonBlocking (uint32_t ui32Base, uint32_t ui32Data)
 Puts a data element into the SPI transmit FIFO. More...
 
void SPIDataPut (uint32_t ui32Base, uint32_t ui32Data)
 Puts a data element into the SPI transmit FIFO. More...
 
void SPIDataGet (uint32_t ui32Base, uint32_t *pui32Data)
 Gets a data element from the SPI receive FIFO. More...
 
int32_t SPIDataGetNonBlocking (uint32_t ui32Base, uint32_t *pui32Data)
 Gets a data element from the SPI receive FIFO. More...
 
static uint32_t SPIIntNumberGet (uint32_t ui32Base)
 
void SPIIntRegister (uint32_t ui32Base, void(*pfnHandler)(void))
 Registers an interrupt handler for the Serial Peripheral Interface in the dynamic interrupt table. More...
 
void SPIIntUnregister (uint32_t ui32Base)
 Unregisters an interrupt handler for the Serial Peripheral Interface in the dynamic interrupt table. More...
 

Function Documentation

§ SPIIntNumberGet()

static uint32_t SPIIntNumberGet ( uint32_t  ui32Base)
static

Referenced by SPIIntRegister(), and SPIIntUnregister().

188 {
189  // Check the arguments
190  ASSERT(SPIBaseValid(ui32Base));
191 
192  // Determine the interrupt number based on the SPI port
193  if(ui32Base == SPI3_BASE)
194  {
195  return INT_SPI3_COMB;
196  }
197  else if(ui32Base == SPI2_BASE)
198  {
199  return INT_SPI2_COMB;
200  }
201  else if(ui32Base == SPI1_BASE)
202  {
203  return INT_SPI1_COMB;
204  }
205  else
206  {
207  return INT_SPI0_COMB;
208  }
209 }
#define ASSERT(expr)
Definition: debug.h:71