TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
SPICC3200DMA.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
103 #ifndef ti_drivers_spi_SPICC3200DMA__include
104 #define ti_drivers_spi_SPICC3200DMA__include
105 
106 #ifdef __cplusplus
107 extern "C" {
108 #endif
109 
110 #include <ti/drivers/ports/HwiP.h>
112 #include <ti/drivers/Power.h>
113 #include <ti/drivers/SPI.h>
114 
115 typedef unsigned long SPIBaseAddrType;
116 typedef unsigned long SPIDataType;
117 
118 /* SPI function table pointer */
120 
135 
188 typedef struct SPICC3200DMA_HWAttrs {
190  SPIBaseAddrType baseAddr;
191 
193  uint32_t intNum;
194 
196  uint32_t intPriority;
197 
199  uint32_t spiPRCM;
200 
202  uint32_t csControl;
203 
204  uint32_t csPolarity;
205 
207  uint32_t pinMode;
208 
210  uint32_t turboMode;
211 
213  uint32_t *scratchBufPtr;
214 
216  unsigned long defaultTxBufValue;
217 
219  uint32_t rxChannelIndex;
220 
222  uint32_t txChannelIndex;
224 
230 typedef struct SPICC3200DMA_Object {
233 
237 
238  /* Data frame size variable */
240 
242 
243  /* Internal RX FIFO trigger amount */
244  uint32_t rxFifoTrigger;
245 
246  /* Internal TX FIFO trigger amount */
247  uint32_t txFifoTrigger;
248 
249  bool isOpen;
250 
251  /* Need to save this for wakeup from LPDS */
253  uint32_t bitRate;
254  uint32_t dataSize;
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 #endif /* ti_drivers_spi_SPICC3200DMA__include */
const SPI_FxnTable SPICC3200DMA_fxnTable
uint32_t pinMode
Definition: SPICC3200DMA.h:207
uint32_t intNum
Definition: SPICC3200DMA.h:193
SPICC3200DMA_FrameSize
SPICC3200DMA data frame size is used to determine how to configure the DMA data transfers. This field is to be only used internally.
Definition: SPICC3200DMA.h:130
SPI driver interface.
void(* SPI_CallbackFxn)(SPI_Handle handle, SPI_Transaction *transaction)
The definition of a callback function used by the SPI driver when used in SPI_MODE_CALLBACK.
Definition: SPI.h:264
bool isOpen
Definition: SPICC3200DMA.h:249
SPI_TransferMode
SPI transfer mode determines the whether the SPI controller operates synchronously or asynchronously...
Definition: SPI.h:298
uint32_t * scratchBufPtr
Definition: SPICC3200DMA.h:213
Definition: SPICC3200DMA.h:133
SPICC3200DMA Hardware attributes.
Definition: SPICC3200DMA.h:188
Power manager interface.
SPI_Transaction * transaction
Definition: SPICC3200DMA.h:236
uint32_t dataSize
Definition: SPICC3200DMA.h:254
SPI_FrameFormat frameFormat
Definition: SPICC3200DMA.h:255
Definition: SPICC3200DMA.h:131
HwiP_Handle hwiHandle
Definition: SPICC3200DMA.h:232
uint32_t txChannelIndex
Definition: SPICC3200DMA.h:222
uint32_t bitRate
Definition: SPICC3200DMA.h:253
void * SemaphoreP_Handle
Opaque client reference to an instance of a SemaphoreP.
Definition: SemaphoreP.h:96
struct SPICC3200DMA_Object SPICC3200DMA_Object
SPICC3200DMA Object.
Semaphore module for the RTOS Porting Interface.
The definition of a SPI function table that contains the required set of functions to control a speci...
Definition: SPI.h:384
SPI_CallbackFxn transferCallbackFxn
Definition: SPICC3200DMA.h:235
struct SPICC3200DMA_Object * SPICC3200DMA_Handle
uint32_t csPolarity
Definition: SPICC3200DMA.h:204
unsigned long SPIBaseAddrType
Definition: SPICC3200DMA.h:115
unsigned long SPIDataType
Definition: SPICC3200DMA.h:116
SemaphoreP_Handle transferComplete
Definition: SPICC3200DMA.h:231
uint32_t rxFifoTrigger
Definition: SPICC3200DMA.h:244
A SPI_Transaction data structure is used with SPI_transfer(). It indicates how many SPI_FrameFormat f...
Definition: SPI.h:244
Power notify object structure.
Definition: Power.h:112
SPI_Mode
Definitions for various SPI modes of operation.
Definition: SPI.h:270
SPIBaseAddrType baseAddr
Definition: SPICC3200DMA.h:190
SPICC3200DMA_FrameSize frameSize
Definition: SPICC3200DMA.h:239
Definition: SPICC3200DMA.h:132
SPI_TransferMode transferMode
Definition: SPICC3200DMA.h:234
struct SPICC3200DMA_HWAttrs SPICC3200DMA_HWAttrs
SPICC3200DMA Hardware attributes.
uint32_t csControl
Definition: SPICC3200DMA.h:202
uint32_t turboMode
Definition: SPICC3200DMA.h:210
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:66
uint32_t rxChannelIndex
Definition: SPICC3200DMA.h:219
Hardware Interrupt module for the RTOS Porting Interface.
Power_NotifyObj notifyObj
Definition: SPICC3200DMA.h:252
uint32_t spiPRCM
Definition: SPICC3200DMA.h:199
uint32_t intPriority
Definition: SPICC3200DMA.h:196
SPI_Mode spiMode
Definition: SPICC3200DMA.h:241
SPICC3200DMA Object.
Definition: SPICC3200DMA.h:230
SPI_FrameFormat
Definitions for various SPI data frame formats.
Definition: SPI.h:279
uint32_t txFifoTrigger
Definition: SPICC3200DMA.h:247
unsigned long defaultTxBufValue
Definition: SPICC3200DMA.h:216
Copyright 2015, Texas Instruments Incorporated