embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SPI Hardware Abstraction Layer for CC3200
Collaboration diagram for SPI Hardware Abstraction Layer for CC3200:

Data Structures

struct  hal_spi_settings_t
 spi settings structure More...
 

Macros

#define SPI_CH   0
 index for General Purpose SPI module More...
 
#define hal_SPI_Enable(channel)   SPIEnable(GSPI_BASE)
 
#define hal_SPI_Disable(channel)   SPIDisable(GSPI_BASE)
 
#define hal_SPI_SpaceAvailable(channel)   (HWREG(GSPI_BASE + MCSPI_O_CH0STAT) & MCSPI_CH0STAT_TXS)
 
#define hal_SPI_DataAvailable(channel)   (HWREG(GSPI_BASE + MCSPI_O_CH0STAT) & MCSPI_CH0STAT_RXS)
 
#define hal_SPI_ClearRxIF(channel)   SPIIntClear(GSPI_BASE, SPI_INT_RX_OVRFLOW|SPI_INT_RX_FULL)
 
#define hal_SPI_ClearTxIF(channel)   SPIIntClear(GSPI_BASE, SPI_INT_TX_UDRFLOW |SPI_INT_TX_EMPTY)
 
#define hal_SPI_EnableRxInterrupt(channel)   SPIIntEnable(GSPI_BASE, SPI_INT_RX_FULL)
 
#define hal_SPI_EnableTxInterrupt(channel)   SPIIntEnable(GSPI_BASE, SPI_INT_TX_EMPTY)
 
#define hal_SPI_DisableRxInterrupt(channel)   SPIIntDisable(GSPI_BASE, SPI_INT_RX_FULL)
 
#define hal_SPI_DisableTxInterrupt(channel)   SPIIntDisable(GSPI_BASE, SPI_INT_TX_EMPTY)
 
#define hal_SPI_RxIntStatus(channel)   SPIIntStatus(GSPI_BASE, SPI_INT_RX_FULL)
 
#define hal_SPI_TxIntStatus(channel)   SPIIntStatus(GSPI_BASE, SPI_INT_TX_EMPTY)
 
#define hal_SPI_TxByte(channel, data)   (HWREG(GSPI_BASE + MCSPI_O_TX0) = data)
 
#define hal_SPI_RxByte(channel)   (uint8_t)(HWREG(GSPI_BASE + MCSPI_O_RX0) & 0xFF)
 

Typedefs

typedef struct hal_spi_settings_t hal_spi_settings_t
 spi settings structure More...
 

Detailed Description

Author
Anthony Merlino

Created on September 9, 2015, 1:31 PM

Todo:
Anthony Merlino document hal_spi_cc3200

Macro Definition Documentation

#define hal_SPI_ClearRxIF (   channel)    SPIIntClear(GSPI_BASE, SPI_INT_RX_OVRFLOW|SPI_INT_RX_FULL)
#define hal_SPI_ClearTxIF (   channel)    SPIIntClear(GSPI_BASE, SPI_INT_TX_UDRFLOW |SPI_INT_TX_EMPTY)
#define hal_SPI_DataAvailable (   channel)    (HWREG(GSPI_BASE + MCSPI_O_CH0STAT) & MCSPI_CH0STAT_RXS)
#define hal_SPI_Disable (   channel)    SPIDisable(GSPI_BASE)
#define hal_SPI_DisableRxInterrupt (   channel)    SPIIntDisable(GSPI_BASE, SPI_INT_RX_FULL)
#define hal_SPI_DisableTxInterrupt (   channel)    SPIIntDisable(GSPI_BASE, SPI_INT_TX_EMPTY)
#define hal_SPI_Enable (   channel)    SPIEnable(GSPI_BASE)
#define hal_SPI_EnableRxInterrupt (   channel)    SPIIntEnable(GSPI_BASE, SPI_INT_RX_FULL)
#define hal_SPI_EnableTxInterrupt (   channel)    SPIIntEnable(GSPI_BASE, SPI_INT_TX_EMPTY)
#define hal_SPI_RxByte (   channel)    (uint8_t)(HWREG(GSPI_BASE + MCSPI_O_RX0) & 0xFF)
#define hal_SPI_RxIntStatus (   channel)    SPIIntStatus(GSPI_BASE, SPI_INT_RX_FULL)
#define hal_SPI_SpaceAvailable (   channel)    (HWREG(GSPI_BASE + MCSPI_O_CH0STAT) & MCSPI_CH0STAT_TXS)
#define hal_SPI_TxByte (   channel,
  data 
)    (HWREG(GSPI_BASE + MCSPI_O_TX0) = data)
#define hal_SPI_TxIntStatus (   channel)    SPIIntStatus(GSPI_BASE, SPI_INT_TX_EMPTY)
#define SPI_CH   0

index for General Purpose SPI module

Typedef Documentation

spi settings structure

Warning
structure had to be above project_settings.h include in order for compiler to find it ???