TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
SPIEUSCIBDMA.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_SPIEUSCIBDMA__include
128 #define ti_drivers_spi_SPIEUSCIBDMA__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 
173 typedef struct SPIEUSCIBDMA_HWAttrs {
175  uint32_t baseAddr;
177  uint8_t clockSource;
179  uint16_t bitOrder;
181  uint8_t *scratchBufPtr;
184 
186  uint32_t dmaBaseAddr;
196 
202 typedef struct SPIEUSCIBDMA_Object {
203  bool isOpen; /* Variable to determine if the SPI is open */
204 
205  Semaphore_Struct transferComplete; /* Notify finished SPI transfer */
206 
207  SPI_TransferMode transferMode; /* SPI transfer mode */
208  SPI_CallbackFxn transferCallbackFxn;/* Callback fxn in CALLBACK mode */
209 
210  SPI_Transaction *transaction; /* Ptr to the current transaction*/
211 
213 
214 #ifdef __cplusplus
215 }
216 #endif
217 
218 #endif /* ti_drivers_spi_SPIEUSCIBDMA__include */
SPIEUSCIBDMA Object.
Definition: SPIEUSCIBDMA.h:202
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: SPIEUSCIBDMA.h:210
bool isOpen
Definition: SPIEUSCIBDMA.h:203
SPI_TransferMode
SPI transfer mode determines the whether the SPI controller operates synchronously or asynchronously...
Definition: SPI.h:298
struct SPIEUSCIBDMA_HWAttrs SPIEUSCIBDMA_HWAttrs
SPIEUSCIBDMA Hardware attributes.
SPIEUSCIBDMA Hardware attributes.
Definition: SPIEUSCIBDMA.h:173
uint32_t baseAddr
Definition: SPIEUSCIBDMA.h:175
uint8_t rxDMASourceTrigger
Definition: SPIEUSCIBDMA.h:190
uint16_t bitOrder
Definition: SPIEUSCIBDMA.h:179
uint8_t txDMASourceTrigger
Definition: SPIEUSCIBDMA.h:194
The definition of a SPI function table that contains the required set of functions to control a speci...
Definition: SPI.h:384
uint8_t txDMAChannelIndex
Definition: SPIEUSCIBDMA.h:192
uint8_t defaultTxBufValue
Definition: SPIEUSCIBDMA.h:183
struct SPIEUSCIBDMA_Object * SPIEUSCIBDMA_Handle
Semaphore_Struct transferComplete
Definition: SPIEUSCIBDMA.h:205
A SPI_Transaction data structure is used with SPI_transfer(). It indicates how many SPI_FrameFormat f...
Definition: SPI.h:244
const SPI_FxnTable SPIEUSCIBDMA_fxnTable
uint32_t dmaBaseAddr
Definition: SPIEUSCIBDMA.h:186
uint8_t clockSource
Definition: SPIEUSCIBDMA.h:177
SPI_CallbackFxn transferCallbackFxn
Definition: SPIEUSCIBDMA.h:208
uint8_t rxDMAChannelIndex
Definition: SPIEUSCIBDMA.h:188
SPI_TransferMode transferMode
Definition: SPIEUSCIBDMA.h:207
uint8_t * scratchBufPtr
Definition: SPIEUSCIBDMA.h:181
struct SPIEUSCIBDMA_Object SPIEUSCIBDMA_Object
SPIEUSCIBDMA Object.
Copyright 2015, Texas Instruments Incorporated