62 #include <inc/hw_memmap.h>
63 #include <inc/hw_types.h>
64 #include <inc/hw_ints.h>
65 #include <inc/hw_spis.h>
84 #ifndef DRIVERLIB_GENERATE_ROM
85 #define SPISDataPut NOROM_SPISDataPut
86 #define SPISTxGetValue NOROM_SPISTxGetValue
87 #define SPISDataGet NOROM_SPISDataGet
88 #define SPISRxGetValue NOROM_SPISRxGetValue
89 #define SPISIntStatus NOROM_SPISIntStatus
97 #define TX_FIFO_SIZE 16 // Size of the TX FIFO
98 #define RX_FIFO_SIZE 16 // Size of the RX FIFO
105 #define SPIS_POS_CLK_POL 0x00000001 // Data captured on rising edge
106 #define SPIS_NEG_CLK_POL 0x00000000 // Data captured on falling edge
107 #define SPIS_TX_BIG_ENDIAN 0x00000002 // TX FIFO is big endian
108 #define SPIS_TX_LITTLE_ENDIAN 0x00000000 // TX FIFO is little endian
109 #define SPIS_RX_BIG_ENDIAN 0x00000004 // RX FIFO is big endian
110 #define SPIS_RX_LITTLE_ENDIAN 0x00000000 // RX FIFO is little endian
111 #define SPIS_TX_DMA_SINGLE 0x00000008 // TX FIFO single DMA request
112 #define SPIS_TX_DMA_BURST 0x00000000 // TX FIFO burst DMA request
113 #define SPIS_RX_DMA_SINGLE 0x00000010 // RX FIFO single DMA request
114 #define SPIS_RX_DMA_BURST 0x00000000 // RX FIFO burst DMA request
121 #define SPIS_TX_FULL 0x00000001 // TX FIFO is full
122 #define SPIS_TX_EMPTY 0x00000002 // TX FIFO is empty
123 #define SPIS_TX_GE_WATERMARK 0x00000004 // TX FIFO is above/equal watermark
124 #define SPIS_TX_LE_WATERMARK 0x00000008 // TX FIFO is below/equal watermark
125 #define SPIS_TX_HASDATA 0x00000010 // TX FIFO has data
126 #define SPIS_TX_UNDER_FLOW 0x00000020 // TX FIFO is out of data
127 #define SPIS_TX_OVER_FLOW 0x00000040 // TX FIFO write attempt failed
128 #define SPIS_TX_MASK 0x0000007F // TX FIFO event mask
129 #define SPIS_RX_FULL 0x00000100 // RX FIFO is full
130 #define SPIS_RX_EMPTY 0x00000200 // RX FIFO is empty
131 #define SPIS_RX_GE_WATERMARK 0x00000400 // RX FIFO is above/equal watermark
132 #define SPIS_RX_LE_WATERMARK 0x00000800 // RX FIFO is below/equal watermark
133 #define SPIS_RX_HASDATA 0x00001000 // RX FIFO has data
134 #define SPIS_RX_UNDER_FLOW 0x00002000 // RX FIFO read attempt failed
135 #define SPIS_RX_OVER_FLOW 0x00004000 // RX FIFO is full + 1
136 #define SPIS_RX_MASK 0x00007F00 // RX FIFO event mask
137 #define SPIS_CHIP_SELECT 0x00010000 // Chip select asserted
138 #define SPIS_INCOMPLETE 0x00020000 // Incomplete transfer
139 #define SPIS_PRX_OVERFLOW 0x00040000 // RX overflow
140 #define SPIS_BYTE_DONE 0x00080000 // Byte transfer complete
141 #define SPIS_DMA_DONE_TX 0x00100000 // DMA done for TX FIFO Channel
142 #define SPIS_DMA_DONE_RX 0x00200000 // DMA done for RX FIFO Channel
143 #define SPIS_GP_MASK 0x003F0000
212 uint32_t ui32TxWatermark)
261 __STATIC_INLINE int32_t
314 __STATIC_INLINE uint32_t
374 __STATIC_INLINE int32_t
429 __STATIC_INLINE uint32_t
842 #ifndef DRIVERLIB_NOROM
844 #ifdef ROM_SPISDataPut
846 #define SPISDataPut ROM_SPISDataPut
848 #ifdef ROM_SPISTxGetValue
849 #undef SPISTxGetValue
850 #define SPISTxGetValue ROM_SPISTxGetValue
852 #ifdef ROM_SPISDataGet
854 #define SPISDataGet ROM_SPISDataGet
856 #ifdef ROM_SPISRxGetValue
857 #undef SPISRxGetValue
858 #define SPISRxGetValue ROM_SPISRxGetValue
860 #ifdef ROM_SPISIntStatus
862 #define SPISIntStatus ROM_SPISIntStatus
__STATIC_INLINE void SPISDmaDisable(void)
Disable SPIS DMA operation.
__STATIC_INLINE void SPISIntUnregister(void)
Unregisters an interrupt handler for the Serial Peripheral Interface Slave.
__STATIC_INLINE void SPISIntRegister(void(*pfnHandler)(void))
Registers an interrupt handler for the Serial Peripheral Interface Slave.
uint32_t SPISIntStatus(bool bMasked)
Gets the current interrupt status.
__STATIC_INLINE void SPISDmaEnable(uint32_t ui32DMASetting)
Enable SPIS DMA operation by setting event source.
__STATIC_INLINE uint32_t SPISTxGetNumBytes(void)
Get the current number of data elements in the TX FIFO.
void SPISDataGet(uint32_t *pui32Data)
Gets a data element from the SPIS Rx FIFO.
__STATIC_INLINE uint32_t SPISRxGetNumBytes(void)
Get the current number of bytes in the RX FIFO.
__STATIC_INLINE void SPISRxFlush(void)
Flush the Rx FIFO.
__STATIC_INLINE void SPISConfig(uint32_t ui32Config, uint32_t ui32RxWatermark, uint32_t ui32TxWatermark)
Configures the SPIS module.
__STATIC_INLINE void SPISIntClear(uint32_t ui32IntFlags)
Clears SPIS interrupt sources.
__STATIC_INLINE void SPISTxFlush(void)
Flush the Tx FIFO.
__STATIC_INLINE int32_t SPISDataPutNonBlocking(uint32_t ui32Data)
Puts a data element into the SPIS transmit FIFO.
__STATIC_INLINE bool SPISBusy(void)
Determines whether the SPIS transmitter is busy or not.
void SPISDataPut(uint32_t ui32Data)
Puts a data element into the SPIS transmit FIFO.
void IntUnregister(uint32_t ui32Interrupt)
Unregisters the function to be called when an interrupt occurs.
uint32_t SPISTxGetValue(uint32_t ui32Index)
Get a specific value in the Tx FIFO.
uint32_t SPISRxGetValue(uint32_t ui32Index)
Get a specific value in the Rx FIFO.
__STATIC_INLINE void SPISIntDisable(uint32_t ui32IntFlags)
Disables individual SPIS interrupt sources.
__STATIC_INLINE void SPISIntEnable(uint32_t ui32IntFlags)
Enables individual SPIS interrupt sources.
__STATIC_INLINE int32_t SPISDataGetNonBlocking(uint32_t *pui32Data)
Gets a data element in a non-blocking fashion from the SPIS receive FIFO.
void IntDisable(uint32_t ui32Interrupt)
Disables an interrupt.
void IntRegister(uint32_t ui32Interrupt, void(*pfnHandler)(void))
Registers a function to be called when an interrupt occurs.
void IntEnable(uint32_t ui32Interrupt)
Enables an interrupt.