TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
SPIEUSCIADMA.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  */
127 #ifndef ti_drivers_spi_SPIEUSCIADMA__include
128 #define ti_drivers_spi_SPIEUSCIADMA__include
129 
130 #ifdef __cplusplus
131 extern "C" {
132 #endif
133 
134 #include <stdint.h>
135 #include <ti/drivers/SPI.h>
136 
137 #include <ti/sysbios/knl/Semaphore.h>
138 
139 /* SPI function table pointer */
141 
174 typedef struct SPIEUSCIADMA_HWAttrs {
176  uint32_t baseAddr;
178  uint8_t clockSource;
180  uint16_t bitOrder;
182  uint8_t *scratchBufPtr;
185 
187  uint32_t dmaBaseAddr;
197 
203 typedef struct SPIEUSCIADMA_Object {
204  bool isOpen; /* Variable to determine if the SPI is open */
205 
206  Semaphore_Struct transferComplete; /* Notify finished SPI transfer */
207 
208  SPI_TransferMode transferMode; /* SPI transfer mode */
209  SPI_CallbackFxn transferCallbackFxn;/* Callback fxn in CALLBACK mode */
210 
211  SPI_Transaction *transaction; /* Ptr to the current transaction */
212 
214 
215 #ifdef __cplusplus
216 }
217 #endif
218 
219 #endif /* ti_drivers_spi_SPIEUSCIADMA__include */
uint8_t rxDMASourceTrigger
Definition: SPIEUSCIADMA.h:191
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
SPI_Transaction * transaction
Definition: SPIEUSCIADMA.h:211
SPIEUSCIADMA Hardware attributes.
Definition: SPIEUSCIADMA.h:174
uint32_t dmaBaseAddr
Definition: SPIEUSCIADMA.h:187
SPI_TransferMode
SPI transfer mode determines the whether the SPI controller operates synchronously or asynchronously...
Definition: SPI.h:298
Semaphore_Struct transferComplete
Definition: SPIEUSCIADMA.h:206
uint8_t defaultTxBufValue
Definition: SPIEUSCIADMA.h:184
SPI_CallbackFxn transferCallbackFxn
Definition: SPIEUSCIADMA.h:209
The definition of a SPI function table that contains the required set of functions to control a speci...
Definition: SPI.h:384
uint32_t baseAddr
Definition: SPIEUSCIADMA.h:176
uint16_t bitOrder
Definition: SPIEUSCIADMA.h:180
bool isOpen
Definition: SPIEUSCIADMA.h:204
uint8_t txDMASourceTrigger
Definition: SPIEUSCIADMA.h:195
struct SPIEUSCIADMA_Object SPIEUSCIADMA_Object
SPIEUSCIADMA Object.
A SPI_Transaction data structure is used with SPI_transfer(). It indicates how many SPI_FrameFormat f...
Definition: SPI.h:244
uint8_t clockSource
Definition: SPIEUSCIADMA.h:178
struct SPIEUSCIADMA_Object * SPIEUSCIADMA_Handle
SPI_TransferMode transferMode
Definition: SPIEUSCIADMA.h:208
const SPI_FxnTable SPIEUSCIADMA_fxnTable
uint8_t * scratchBufPtr
Definition: SPIEUSCIADMA.h:182
uint8_t rxDMAChannelIndex
Definition: SPIEUSCIADMA.h:189
uint8_t txDMAChannelIndex
Definition: SPIEUSCIADMA.h:193
struct SPIEUSCIADMA_HWAttrs SPIEUSCIADMA_HWAttrs
SPIEUSCIADMA Hardware attributes.
SPIEUSCIADMA Object.
Definition: SPIEUSCIADMA.h:203
Copyright 2015, Texas Instruments Incorporated