TI-RTOS for SimpleLink Wireless MCUs  2.14.02.22
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 
95 typedef struct UARTCC3200DMA_HWAttrs {
97  unsigned int baseAddr;
99  unsigned int intNum;
101  unsigned int intPriority;
103  unsigned long rxChannelIndex;
105  unsigned long txChannelIndex;
107 
113 typedef struct UARTCC3200DMA_Object {
114  /* UART control variables */
115  bool opened; /* Has the obj been opened */
116  UART_Mode readMode; /* Mode for all read calls */
117  UART_Mode writeMode; /* Mode for all write calls */
118  unsigned int readTimeout; /* Timeout for read semaphore */
119  unsigned int writeTimeout; /* Timeout for write semaphore */
120  UART_Callback readCallback; /* Pointer to read callback */
121  UART_Callback writeCallback; /* Pointer to write callback */
122  UART_ReturnMode readReturnMode; /* Receive return mode */
123  UART_DataMode readDataMode; /* Type of data being read */
124  UART_DataMode writeDataMode; /* Type of data being written */
125  uint32_t baudRate;
129  UART_Echo readEcho; /* Echo received data back */
130 
131  /* UART write variables */
132  const void *writeBuf; /* Buffer data pointer */
133  size_t writeCount; /* Number of Chars sent */
134  size_t writeSize; /* Chars remaining in buffer */
135 
136  /* UART receive variables */
137  void *readBuf; /* Buffer data pointer */
138  size_t readCount; /* Number of Chars read */
139  size_t readSize; /* Chars remaining in buffer */
140 
141  /* Semaphores for blocking mode */
142  SemaphoreP_Handle writeSem; /* UART write semaphore */
143  SemaphoreP_Handle readSem; /* UART read semaphore */
144 
146 
147  /* For Power management */
151 
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #endif /* ti_drivers_uart_UARTCC3200DMA__include */
UART_STOP
UART stop bit settings.
Definition: UART.h:379
unsigned int readTimeout
Definition: UARTCC3200DMA.h:118
UART_Echo readEcho
Definition: UARTCC3200DMA.h:129
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:124
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:149
size_t readCount
Definition: UARTCC3200DMA.h:138
UART_Echo
UART echo settings.
Definition: UART.h:357
uint32_t baudRate
Definition: UARTCC3200DMA.h:125
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:123
ClockP_Handle txFifoEmptyClk
Definition: UARTCC3200DMA.h:148
SemaphoreP_Handle readSem
Definition: UARTCC3200DMA.h:143
size_t writeSize
Definition: UARTCC3200DMA.h:134
void * readBuf
Definition: UARTCC3200DMA.h:137
UART_Mode readMode
Definition: UARTCC3200DMA.h:116
unsigned int intNum
Definition: UARTCC3200DMA.h:99
Power notify object structure.
Definition: Power.h:112
UART driver interface.
UART_STOP stopBits
Definition: UARTCC3200DMA.h:127
SemaphoreP_Handle writeSem
Definition: UARTCC3200DMA.h:142
UART_LEN dataLength
Definition: UARTCC3200DMA.h:126
unsigned int intPriority
Definition: UARTCC3200DMA.h:101
const UART_FxnTable UARTCC3200DMA_fxnTable
const void * writeBuf
Definition: UARTCC3200DMA.h:132
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:128
UARTCC3200DMA Hardware attributes.
Definition: UARTCC3200DMA.h:95
unsigned long rxChannelIndex
Definition: UARTCC3200DMA.h:103
unsigned int writeTimeout
Definition: UARTCC3200DMA.h:119
HwiP_Handle hwiHandle
Definition: UARTCC3200DMA.h:145
unsigned int baseAddr
Definition: UARTCC3200DMA.h:97
size_t readSize
Definition: UARTCC3200DMA.h:139
UART_LEN
UART data length settings.
Definition: UART.h:367
UART_Callback writeCallback
Definition: UARTCC3200DMA.h:121
size_t writeCount
Definition: UARTCC3200DMA.h:133
void * HwiP_Handle
Opaque client reference to an instance of a HwiP.
Definition: HwiP.h:66
UART_ReturnMode readReturnMode
Definition: UARTCC3200DMA.h:122
UARTCC3200DMA Object.
Definition: UARTCC3200DMA.h:113
struct UARTCC3200DMA_Object * UARTCC3200DMA_Handle
UART_Callback readCallback
Definition: UARTCC3200DMA.h:120
unsigned long txChannelIndex
Definition: UARTCC3200DMA.h:105
Hardware Interrupt module for the RTOS Porting Interface.
bool opened
Definition: UARTCC3200DMA.h:115
UART_Mode writeMode
Definition: UARTCC3200DMA.h:117
void * ClockP_Handle
Opaque client reference to an instance of a ClockP.
Definition: ClockP.h:91
Copyright 2015, Texas Instruments Incorporated