TI-RTOS Drivers  tidrivers_full_2_20_00_08
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  */
129 #ifndef ti_drivers_spi_SPIEUSCIADMA__include
130 #define ti_drivers_spi_SPIEUSCIADMA__include
131 
132 #ifdef __cplusplus
133 extern "C" {
134 #endif
135 
136 #include <stdint.h>
137 #include <ti/drivers/SPI.h>
138 
139 #include <ti/sysbios/knl/Semaphore.h>
140 
151 /* Add SPIEUSCIADMA_STATUS_* macros here */
152 
165 /* Add SPIEUSCIADMA_CMD_* macros here */
166 
169 /* SPI function table pointer */
171 
204 typedef struct SPIEUSCIADMA_HWAttrs {
206  uint32_t baseAddr;
208  uint8_t clockSource;
210  uint16_t bitOrder;
212  uint8_t *scratchBufPtr;
215 
217  uint32_t dmaBaseAddr;
227 
233 typedef struct SPIEUSCIADMA_Object {
234  bool isOpen; /* Variable to determine if the SPI is open */
235 
236  Semaphore_Struct transferComplete; /* Notify finished SPI transfer */
237 
238  SPI_TransferMode transferMode; /* SPI transfer mode */
239  SPI_CallbackFxn transferCallbackFxn;/* Callback fxn in CALLBACK mode */
240 
241  SPI_Transaction *transaction; /* Ptr to the current transaction */
242 
244 
245 #ifdef __cplusplus
246 }
247 #endif
248 
249 #endif /* ti_drivers_spi_SPIEUSCIADMA__include */
uint8_t rxDMASourceTrigger
Definition: SPIEUSCIADMA.h:221
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:282
SPI_Transaction * transaction
Definition: SPIEUSCIADMA.h:241
SPIEUSCIADMA Hardware attributes.
Definition: SPIEUSCIADMA.h:204
uint32_t dmaBaseAddr
Definition: SPIEUSCIADMA.h:217
SPI_TransferMode
SPI transfer mode determines the whether the SPI controller operates synchronously or asynchronously...
Definition: SPI.h:316
Semaphore_Struct transferComplete
Definition: SPIEUSCIADMA.h:236
uint8_t defaultTxBufValue
Definition: SPIEUSCIADMA.h:214
SPI_CallbackFxn transferCallbackFxn
Definition: SPIEUSCIADMA.h:239
The definition of a SPI function table that contains the required set of functions to control a speci...
Definition: SPI.h:402
uint32_t baseAddr
Definition: SPIEUSCIADMA.h:206
uint16_t bitOrder
Definition: SPIEUSCIADMA.h:210
bool isOpen
Definition: SPIEUSCIADMA.h:234
uint8_t txDMASourceTrigger
Definition: SPIEUSCIADMA.h:225
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:262
uint8_t clockSource
Definition: SPIEUSCIADMA.h:208
struct SPIEUSCIADMA_Object * SPIEUSCIADMA_Handle
SPI_TransferMode transferMode
Definition: SPIEUSCIADMA.h:238
const SPI_FxnTable SPIEUSCIADMA_fxnTable
uint8_t * scratchBufPtr
Definition: SPIEUSCIADMA.h:212
uint8_t rxDMAChannelIndex
Definition: SPIEUSCIADMA.h:219
uint8_t txDMAChannelIndex
Definition: SPIEUSCIADMA.h:223
struct SPIEUSCIADMA_HWAttrs SPIEUSCIADMA_HWAttrs
SPIEUSCIADMA Hardware attributes.
SPIEUSCIADMA Object.
Definition: SPIEUSCIADMA.h:233
Copyright 2016, Texas Instruments Incorporated