TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
UARTCC3200DMA.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-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  */
47 #ifndef ti_drivers_uart_UARTCC3200DMA__include
48 #define ti_drivers_uart_UARTCC3200DMA__include
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 #include <stdint.h>
55 #include <stdbool.h>
56 
58 #include <ti/drivers/ports/HwiP.h>
59 
61 #include <ti/drivers/Power.h>
62 #include <ti/drivers/UART.h>
63 
64 /* UART function table pointer */
66 
106 typedef struct UARTCC3200DMA_HWAttrs {
108  unsigned int baseAddr;
110  unsigned int intNum;
112  unsigned int intPriority;
114  unsigned long rxChannelIndex;
116  unsigned long txChannelIndex;
118 
124 typedef struct UARTCC3200DMA_Object {
125  /* UART control variables */
126  bool opened; /* Has the obj been opened */
127  UART_Mode readMode; /* Mode for all read calls */
128  UART_Mode writeMode; /* Mode for all write calls */
129  unsigned int readTimeout; /* Timeout for read semaphore */
130  unsigned int writeTimeout; /* Timeout for write semaphore */
131  UART_Callback readCallback; /* Pointer to read callback */
132  UART_Callback writeCallback; /* Pointer to write callback */
133  UART_ReturnMode readReturnMode; /* Receive return mode */
134  UART_DataMode readDataMode; /* Type of data being read */
135  UART_DataMode writeDataMode; /* Type of data being written */
136  uint32_t baudRate;
140  UART_Echo readEcho; /* Echo received data back */
141 
142  /* UART write variables */
143  const void *writeBuf; /* Buffer data pointer */
144  size_t writeCount; /* Number of Chars sent */
145  size_t writeSize; /* Chars remaining in buffer */
146 
147  /* UART receive variables */
148  void *readBuf; /* Buffer data pointer */
149  size_t readCount; /* Number of Chars read */
150  size_t readSize; /* Chars remaining in buffer */
151 
152  /* Semaphores for blocking mode */
153  SemaphoreP_Handle writeSem; /* UART write semaphore */
154  SemaphoreP_Handle readSem; /* UART read semaphore */
155 
157 
158  /* For Power management */
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif /* ti_drivers_uart_UARTCC3200DMA__include */
UART_STOP
UART stop bit settings.
Definition: UART.h:379
unsigned int readTimeout
Definition: UARTCC3200DMA.h:129
UART_Echo readEcho
Definition: UARTCC3200DMA.h:140
Clock interface for the RTOS Porting Interface.
The definition of a UART function table that contains the required set of functions to control a spec...
Definition: UART.h:497
Power manager interface.
UART_PAR
UART parity type settings.
Definition: UART.h:389
UART_DataMode writeDataMode
Definition: UARTCC3200DMA.h:135
struct UARTCC3200DMA_Object UARTCC3200DMA_Object
UARTCC3200DMA Object.
UART_Mode
UART mode settings.
Definition: UART.h:291
UART_DataMode
UART data mode settings.
Definition: UART.h:339
struct UARTCC3200DMA_HWAttrs UARTCC3200DMA_HWAttrs
UARTCC3200DMA Hardware attributes.
UART_ReturnMode
UART return mode settings.
Definition: UART.h:324
Power_NotifyObj postNotify
Definition: UARTCC3200DMA.h:160
size_t readCount
Definition: UARTCC3200DMA.h:149
UART_Echo
UART echo settings.
Definition: UART.h:357
uint32_t baudRate
Definition: UARTCC3200DMA.h:136
void * SemaphoreP_Handle
Opaque client reference to an instance of a SemaphoreP.
Definition: SemaphoreP.h:96
Semaphore module for the RTOS Porting Interface.
UART_DataMode readDataMode
Definition: UARTCC3200DMA.h:134
ClockP_Handle txFifoEmptyClk
Definition: UARTCC3200DMA.h:159
SemaphoreP_Handle readSem
Definition: UARTCC3200DMA.h:154
size_t writeSize
Definition: UARTCC3200DMA.h:145
void * readBuf
Definition: UARTCC3200DMA.h:148
UART_Mode readMode
Definition: UARTCC3200DMA.h:127
unsigned int intNum
Definition: UARTCC3200DMA.h:110
Power notify object structure.
Definition: Power.h:112
UART driver interface.
UART_STOP stopBits
Definition: UARTCC3200DMA.h:138
SemaphoreP_Handle writeSem
Definition: UARTCC3200DMA.h:153
UART_LEN dataLength
Definition: UARTCC3200DMA.h:137
unsigned int intPriority
Definition: UARTCC3200DMA.h:112
const UART_FxnTable UARTCC3200DMA_fxnTable
const void * writeBuf
Definition: UARTCC3200DMA.h:143
void(* UART_Callback)(UART_Handle, void *buf, size_t count)
The definition of a callback function used by the UART driver when used in UART_MODE_CALLBACK The cal...
Definition: UART.h:284
UART_PAR parityType
Definition: UARTCC3200DMA.h:139
UARTCC3200DMA Hardware attributes.
Definition: UARTCC3200DMA.h:106
unsigned long rxChannelIndex
Definition: UARTCC3200DMA.h:114
unsigned int writeTimeout
Definition: UARTCC3200DMA.h:130
HwiP_Handle hwiHandle
Definition: UARTCC3200DMA.h:156
unsigned int baseAddr
Definition: UARTCC3200DMA.h:108
size_t readSize
Definition: UARTCC3200DMA.h:150
UART_LEN
UART data length settings.
Definition: UART.h:367
UART_Callback writeCallback
Definition: UARTCC3200DMA.h:132
size_t writeCount
Definition: UARTCC3200DMA.h:144
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:66
UART_ReturnMode readReturnMode
Definition: UARTCC3200DMA.h:133
UARTCC3200DMA Object.
Definition: UARTCC3200DMA.h:124
struct UARTCC3200DMA_Object * UARTCC3200DMA_Handle
UART_Callback readCallback
Definition: UARTCC3200DMA.h:131
unsigned long txChannelIndex
Definition: UARTCC3200DMA.h:116
Hardware Interrupt module for the RTOS Porting Interface.
bool opened
Definition: UARTCC3200DMA.h:126
UART_Mode writeMode
Definition: UARTCC3200DMA.h:128
void * ClockP_Handle
Opaque client reference to an instance of a ClockP.
Definition: ClockP.h:91
Copyright 2015, Texas Instruments Incorporated