TI-RTOS for SimpleLink Wireless MCUs  2.14.02.22
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 
177 typedef struct SPICC3200DMA_HWAttrs {
179  SPIBaseAddrType baseAddr;
180 
182  uint32_t intNum;
183 
185  uint32_t intPriority;
186 
188  uint32_t spiPRCM;
189 
191  uint32_t csControl;
192 
193  uint32_t csPolarity;
194 
196  uint32_t pinMode;
197 
199  uint32_t turboMode;
200 
202  uint32_t *scratchBufPtr;
203 
205  unsigned long defaultTxBufValue;
206 
208  uint32_t rxChannelIndex;
209 
211  uint32_t txChannelIndex;
213 
219 typedef struct SPICC3200DMA_Object {
222 
226 
227  /* Data frame size variable */
229 
231 
232  /* Internal RX FIFO trigger amount */
233  uint32_t rxFifoTrigger;
234 
235  /* Internal TX FIFO trigger amount */
236  uint32_t txFifoTrigger;
237 
238  bool isOpen;
239 
240  /* Need to save this for wakeup from LPDS */
242  uint32_t bitRate;
243  uint32_t dataSize;
246 
247 #ifdef __cplusplus
248 }
249 #endif
250 
251 #endif /* ti_drivers_spi_SPICC3200DMA__include */
const SPI_FxnTable SPICC3200DMA_fxnTable
uint32_t pinMode
Definition: SPICC3200DMA.h:196
uint32_t intNum
Definition: SPICC3200DMA.h:182
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:238
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:202
Definition: SPICC3200DMA.h:133
SPICC3200DMA Hardware attributes.
Definition: SPICC3200DMA.h:177
Power manager interface.
SPI_Transaction * transaction
Definition: SPICC3200DMA.h:225
uint32_t dataSize
Definition: SPICC3200DMA.h:243
SPI_FrameFormat frameFormat
Definition: SPICC3200DMA.h:244
Definition: SPICC3200DMA.h:131
HwiP_Handle hwiHandle
Definition: SPICC3200DMA.h:221
uint32_t txChannelIndex
Definition: SPICC3200DMA.h:211
uint32_t bitRate
Definition: SPICC3200DMA.h:242
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:224
struct SPICC3200DMA_Object * SPICC3200DMA_Handle
uint32_t csPolarity
Definition: SPICC3200DMA.h:193
unsigned long SPIBaseAddrType
Definition: SPICC3200DMA.h:115
unsigned long SPIDataType
Definition: SPICC3200DMA.h:116
SemaphoreP_Handle transferComplete
Definition: SPICC3200DMA.h:220
uint32_t rxFifoTrigger
Definition: SPICC3200DMA.h:233
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:179
SPICC3200DMA_FrameSize frameSize
Definition: SPICC3200DMA.h:228
Definition: SPICC3200DMA.h:132
SPI_TransferMode transferMode
Definition: SPICC3200DMA.h:223
struct SPICC3200DMA_HWAttrs SPICC3200DMA_HWAttrs
SPICC3200DMA Hardware attributes.
uint32_t csControl
Definition: SPICC3200DMA.h:191
uint32_t turboMode
Definition: SPICC3200DMA.h:199
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:66
uint32_t rxChannelIndex
Definition: SPICC3200DMA.h:208
Hardware Interrupt module for the RTOS Porting Interface.
Power_NotifyObj notifyObj
Definition: SPICC3200DMA.h:241
uint32_t spiPRCM
Definition: SPICC3200DMA.h:188
uint32_t intPriority
Definition: SPICC3200DMA.h:185
SPI_Mode spiMode
Definition: SPICC3200DMA.h:230
SPICC3200DMA Object.
Definition: SPICC3200DMA.h:219
SPI_FrameFormat
Definitions for various SPI data frame formats.
Definition: SPI.h:279
uint32_t txFifoTrigger
Definition: SPICC3200DMA.h:236
unsigned long defaultTxBufValue
Definition: SPICC3200DMA.h:205
Copyright 2015, Texas Instruments Incorporated