SimpleLink MCU SDK Driver APIs  tidrivers_msp43x_3_01_01_03
UARTMSP432.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016, 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  */
111 #ifndef ti_drivers_uart_UARTMSP432__include
112 #define ti_drivers_uart_UARTMSP432__include
113 
114 #ifdef __cplusplus
115 extern "C" {
116 #endif
117 
118 #include <stdint.h>
119 #include <stdbool.h>
120 
121 #include <ti/devices/msp432p4xx/inc/msp.h>
122 
123 #include <ti/drivers/dpl/ClockP.h>
124 #include <ti/drivers/dpl/HwiP.h>
125 #include <ti/drivers/dpl/SemaphoreP.h>
126 #include <ti/drivers/Power.h>
127 #include <ti/drivers/UART.h>
129 
130 
131 #define UARTMSP432_P1_2_UCA0RXD 0x00000112 /* Primary, port 1, pin 2 */
132 #define UARTMSP432_P1_3_UCA0TXD 0x00000113 /* Primary, port 1, pin 3 */
133 
134 /* Port 2, pin 0 */
135 #define UARTMSP432_P2_0_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x20)
136 #define UARTMSP432_P2_0_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x20)
137 #define UARTMSP432_P2_0_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x20)
138 #define UARTMSP432_P2_0_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x20)
139 #define UARTMSP432_P2_0_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x20)
140 #define UARTMSP432_P2_0_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x20)
141 
142 /* Port 2, pin 1 */
143 #define UARTMSP432_P2_1_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x21)
144 #define UARTMSP432_P2_1_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x21)
145 #define UARTMSP432_P2_1_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x21)
146 #define UARTMSP432_P2_1_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x21)
147 #define UARTMSP432_P2_1_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x21)
148 #define UARTMSP432_P2_1_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x21)
149 
150 /* Port 2, pin 2 */
151 #define UARTMSP432_P2_2_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x22)
152 #define UARTMSP432_P2_2_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x22)
153 #define UARTMSP432_P2_2_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x22)
154 #define UARTMSP432_P2_2_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x22)
155 #define UARTMSP432_P2_2_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x22)
156 #define UARTMSP432_P2_2_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x22)
157 
158 /* Port 2, pin 3 */
159 #define UARTMSP432_P2_3_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x23)
160 #define UARTMSP432_P2_3_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x23)
161 #define UARTMSP432_P2_3_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x23)
162 #define UARTMSP432_P2_3_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x23)
163 #define UARTMSP432_P2_3_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x23)
164 #define UARTMSP432_P2_3_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x23)
165 
166 /* Port 2, pin 4 */
167 #define UARTMSP432_P2_4_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x24)
168 #define UARTMSP432_P2_4_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x24)
169 #define UARTMSP432_P2_4_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x24)
170 #define UARTMSP432_P2_4_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x24)
171 #define UARTMSP432_P2_4_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x24)
172 #define UARTMSP432_P2_4_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x24)
173 
174 /* Port 2, pin 5 */
175 #define UARTMSP432_P2_5_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x25)
176 #define UARTMSP432_P2_5_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x25)
177 #define UARTMSP432_P2_5_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x25)
178 #define UARTMSP432_P2_5_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x25)
179 #define UARTMSP432_P2_5_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x25)
180 #define UARTMSP432_P2_5_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x25)
181 
182 /* Port 2, pin 6 */
183 #define UARTMSP432_P2_6_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x26)
184 #define UARTMSP432_P2_6_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x26)
185 #define UARTMSP432_P2_6_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x26)
186 #define UARTMSP432_P2_6_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x26)
187 #define UARTMSP432_P2_6_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x26)
188 #define UARTMSP432_P2_6_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x26)
189 
190 /* Port 2, pin 7 */
191 #define UARTMSP432_P2_7_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x27)
192 #define UARTMSP432_P2_7_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x27)
193 #define UARTMSP432_P2_7_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x27)
194 #define UARTMSP432_P2_7_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x27)
195 #define UARTMSP432_P2_7_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x27)
196 #define UARTMSP432_P2_7_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x27)
197 
198 /* Port 3, pin 0 */
199 #define UARTMSP432_P3_0_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x30)
200 #define UARTMSP432_P3_0_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x30)
201 #define UARTMSP432_P3_0_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x30)
202 #define UARTMSP432_P3_0_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x30)
203 #define UARTMSP432_P3_0_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x30)
204 #define UARTMSP432_P3_0_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x30)
205 
206 /* Port 3, pin 1 */
207 #define UARTMSP432_P3_1_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x31)
208 #define UARTMSP432_P3_1_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x31)
209 #define UARTMSP432_P3_1_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x31)
210 #define UARTMSP432_P3_1_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x31)
211 #define UARTMSP432_P3_1_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x31)
212 #define UARTMSP432_P3_1_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x31)
213 
214 /* Port 3, pin 2 */
215 #define UARTMSP432_P3_2_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x32)
216 #define UARTMSP432_P3_2_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x32)
217 #define UARTMSP432_P3_2_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x32)
218 #define UARTMSP432_P3_2_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x32)
219 #define UARTMSP432_P3_2_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x32)
220 #define UARTMSP432_P3_2_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x32)
221 
222 /* Port 3, pin 3 */
223 #define UARTMSP432_P3_3_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x33)
224 #define UARTMSP432_P3_3_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x33)
225 #define UARTMSP432_P3_3_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x33)
226 #define UARTMSP432_P3_3_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x33)
227 #define UARTMSP432_P3_3_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x33)
228 #define UARTMSP432_P3_3_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x33)
229 
230 /* Port 3, pin 4 */
231 #define UARTMSP432_P3_4_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x34)
232 #define UARTMSP432_P3_4_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x34)
233 #define UARTMSP432_P3_4_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x34)
234 #define UARTMSP432_P3_4_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x34)
235 #define UARTMSP432_P3_4_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x34)
236 #define UARTMSP432_P3_4_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x34)
237 
238 /* Port 3, pin 5 */
239 #define UARTMSP432_P3_5_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x35)
240 #define UARTMSP432_P3_5_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x35)
241 #define UARTMSP432_P3_5_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x35)
242 #define UARTMSP432_P3_5_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x35)
243 #define UARTMSP432_P3_5_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x35)
244 #define UARTMSP432_P3_5_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x35)
245 
246 /* Port 3, pin 6 */
247 #define UARTMSP432_P3_6_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x36)
248 #define UARTMSP432_P3_6_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x36)
249 #define UARTMSP432_P3_6_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x36)
250 #define UARTMSP432_P3_6_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x36)
251 #define UARTMSP432_P3_6_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x36)
252 #define UARTMSP432_P3_6_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x36)
253 
254 /* Port 3, pin 7 */
255 #define UARTMSP432_P3_7_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x37)
256 #define UARTMSP432_P3_7_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x37)
257 #define UARTMSP432_P3_7_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x37)
258 #define UARTMSP432_P3_7_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x37)
259 #define UARTMSP432_P3_7_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x37)
260 #define UARTMSP432_P3_7_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x37)
261 
262 /* Port 7, pin 0 */
263 #define UARTMSP432_P7_0_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x70)
264 #define UARTMSP432_P7_0_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x70)
265 #define UARTMSP432_P7_0_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x70)
266 #define UARTMSP432_P7_0_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x70)
267 #define UARTMSP432_P7_0_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x70)
268 #define UARTMSP432_P7_0_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x70)
269 
270 /* Port 7, pin 1 */
271 #define UARTMSP432_P7_1_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x71)
272 #define UARTMSP432_P7_1_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x71)
273 #define UARTMSP432_P7_1_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x71)
274 #define UARTMSP432_P7_1_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x71)
275 #define UARTMSP432_P7_1_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x71)
276 #define UARTMSP432_P7_1_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x71)
277 
278 /* Port 7, pin 2 */
279 #define UARTMSP432_P7_2_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x72)
280 #define UARTMSP432_P7_2_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x72)
281 #define UARTMSP432_P7_2_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x72)
282 #define UARTMSP432_P7_2_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x72)
283 #define UARTMSP432_P7_2_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x72)
284 #define UARTMSP432_P7_2_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x72)
285 
286 /* Port 7, pin 3 */
287 #define UARTMSP432_P7_3_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x73)
288 #define UARTMSP432_P7_3_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x73)
289 #define UARTMSP432_P7_3_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x73)
290 #define UARTMSP432_P7_3_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x73)
291 #define UARTMSP432_P7_3_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x73)
292 #define UARTMSP432_P7_3_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x73)
293 
294 /* Port 7, pin 4 */
295 #define UARTMSP432_P7_4_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x74)
296 #define UARTMSP432_P7_4_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x74)
297 #define UARTMSP432_P7_4_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x74)
298 #define UARTMSP432_P7_4_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x74)
299 #define UARTMSP432_P7_4_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x74)
300 #define UARTMSP432_P7_4_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x74)
301 
302 /* Port 7, pin 5 */
303 #define UARTMSP432_P7_5_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x75)
304 #define UARTMSP432_P7_5_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x75)
305 #define UARTMSP432_P7_5_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x75)
306 #define UARTMSP432_P7_5_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x75)
307 #define UARTMSP432_P7_5_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x75)
308 #define UARTMSP432_P7_5_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x75)
309 
310 /* Port 7, pin 6 */
311 #define UARTMSP432_P7_6_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x76)
312 #define UARTMSP432_P7_6_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x76)
313 #define UARTMSP432_P7_6_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x76)
314 #define UARTMSP432_P7_6_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x76)
315 #define UARTMSP432_P7_6_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x76)
316 #define UARTMSP432_P7_6_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x76)
317 
318 /* Port 7, pin 7 */
319 #define UARTMSP432_P7_7_UCA0RXD ((PMAP_UCA0RXD << 10) | 0x77)
320 #define UARTMSP432_P7_7_UCA0TXD ((PMAP_UCA0TXD << 10) | 0x77)
321 #define UARTMSP432_P7_7_UCA1RXD ((PMAP_UCA1RXD << 10) | 0x77)
322 #define UARTMSP432_P7_7_UCA1TXD ((PMAP_UCA1TXD << 10) | 0x77)
323 #define UARTMSP432_P7_7_UCA2RXD ((PMAP_UCA2RXD << 10) | 0x77)
324 #define UARTMSP432_P7_7_UCA2TXD ((PMAP_UCA2TXD << 10) | 0x77)
325 
326 #define UARTMSP432_P9_6_UCA3RXD 0x00000196 /* Primary, port 9, pin 6 */
327 #define UARTMSP432_P9_7_UCA3TXD 0x00000197 /* Primeary, port 9, pin 7 */
328 
339 /* Add UARTMSP432_STATUS_* macros here */
340 
353 /* Add UARTMSP432_CMD_* macros here */
354 
357 /* UART function table pointer */
359 
381 typedef struct UARTMSP432_FxnSet {
382  bool (*readIsrFxn) (UART_Handle handle);
383  int (*readTaskFxn) (UART_Handle handle);
385 
417  uint32_t outputBaudrate;
418  uint32_t inputClockFreq;
420  uint16_t prescalar;
421  uint8_t hwRegUCBRFx;
422  uint8_t hwRegUCBRSx;
423  uint8_t oversampling;
425 
476 typedef struct UARTMSP432_HWAttrsV1 {
478  unsigned int baseAddr;
480  unsigned int intNum;
482  unsigned int intPriority;
484  uint8_t clockSource;
486  uint32_t bitOrder;
492  unsigned char *ringBufPtr;
494  size_t ringBufSize;
495 
496  uint16_t rxPin;
497  uint16_t txPin;
499 
505 typedef struct UARTMSP432_Object {
506  /* UART state variable */
507  struct {
508  bool opened:1; /* Has the obj been opened */
509  UART_Mode readMode:1; /* Mode for all read calls */
510  UART_Mode writeMode:1; /* Mode for all write calls */
511  UART_DataMode readDataMode:1; /* Type of data being read */
512  UART_DataMode writeDataMode:1; /* Type of data being written */
513  UART_ReturnMode readReturnMode:1; /* Receive return mode */
514  UART_Echo readEcho:1; /* Echo received data back */
515  bool writeCR:1; /* Write a return character */
516  /*
517  * Flag to determine if a timeout has occurred when the user called
518  * UART_read(). This flag is set by the timeoutClk clock object.
519  */
520  bool bufTimeout:1;
521  /*
522  * Flag to determine when an ISR needs to perform a callback; in both
523  * UART_MODE_BLOCKING or UART_MODE_CALLBACK
524  */
525  bool callCallback:1;
526  /*
527  * Flag to determine if the ISR is in control draining the ring buffer
528  * when in UART_MODE_CALLBACK
529  */
530  bool drainByISR:1;
531  /* Flag to keep the state of the read Power constraints */
532  bool rxEnabled:1;
533  /* Flag to keep the state of the write Power constraints */
534  bool txEnabled:1;
535  } state;
536 
537  HwiP_Handle hwiHandle; /* Hwi handle for interrupts */
538  ClockP_Handle timeoutClk; /* Clock object to for timeouts */
539  uint32_t baudRate; /* Baud rate for UART */
540  UART_STOP stopBits; /* Stop bits for UART */
541  UART_PAR parityType; /* Parity bit type for UART */
542 
543  /* UART read variables */
544  RingBuf_Object ringBuffer; /* local circular buffer object */
545  /* A complement pair of read functions for both the ISR and UART_read() */
547  unsigned char *readBuf; /* Buffer data pointer */
548  size_t readSize; /* Desired number of bytes to read */
549  size_t readCount; /* Number of bytes left to read */
550  SemaphoreP_Handle readSem; /* UART read semaphore */
551  unsigned int readTimeout; /* Timeout for read semaphore */
552  UART_Callback readCallback; /* Pointer to read callback */
553 
554  /* UART write variables */
555  const unsigned char *writeBuf; /* Buffer data pointer */
556  size_t writeSize; /* Desired number of bytes to write*/
557  size_t writeCount; /* Number of bytes left to write */
558  SemaphoreP_Handle writeSem; /* UART write semaphore*/
559  unsigned int writeTimeout; /* Timeout for write semaphore */
560  UART_Callback writeCallback; /* Pointer to write callback */
561  unsigned int writeEmptyClkTimeout; /* TX FIFO timeout tick count */
562 
566 
567 #ifdef __cplusplus
568 }
569 #endif
570 
571 #endif /* ti_drivers_uart_UARTMSP432__include */
unsigned int baseAddr
Definition: UARTMSP432.h:478
UARTMSP432 Baudrate configuration.
Definition: UARTMSP432.h:416
UART_Echo readEcho
Definition: UARTMSP432.h:514
uint32_t outputBaudrate
Definition: UARTMSP432.h:417
uint32_t baudRate
Definition: UARTMSP432.h:539
bool callCallback
Definition: UARTMSP432.h:525
RingBuf_Object ringBuffer
Definition: UARTMSP432.h:544
enum UART_Echo_ UART_Echo
UART echo settings.
bool writeCR
Definition: UARTMSP432.h:515
SemaphoreP_Handle writeSem
Definition: UARTMSP432.h:558
unsigned int writeEmptyClkTimeout
Definition: UARTMSP432.h:561
uint8_t clockSource
Definition: UARTMSP432.h:484
unsigned char * ringBufPtr
Definition: UARTMSP432.h:492
struct UARTMSP432_BaudrateConfig UARTMSP432_BaudrateConfig
UARTMSP432 Baudrate configuration.
bool txEnabled
Definition: UARTMSP432.h:534
uint32_t inputClockFreq
Definition: UARTMSP432.h:418
uint16_t prescalar
Definition: UARTMSP432.h:420
enum UART_PAR_ UART_PAR
UART parity type settings.
const unsigned char * writeBuf
Definition: UARTMSP432.h:555
Power manager interface.
enum UART_Mode_ UART_Mode
UART mode settings.
Power notify object structure.
Definition: Power.h:113
struct UARTMSP432_FxnSet UARTMSP432_FxnSet
Complement set of read functions to be used by the UART ISR and UARTMSP432_read(). Internal use only.
uint32_t bitOrder
Definition: UARTMSP432.h:486
UART_Mode writeMode
Definition: UARTMSP432.h:510
bool bufTimeout
Definition: UARTMSP432.h:520
uint16_t txPin
Definition: UARTMSP432.h:497
ClockP_Handle timeoutClk
Definition: UARTMSP432.h:538
UART_PAR parityType
Definition: UARTMSP432.h:541
UART Global configuration.
Definition: UART.h:691
uint8_t numBaudrateEntries
Definition: UARTMSP432.h:488
size_t writeSize
Definition: UARTMSP432.h:556
struct UARTMSP432_Object * UARTMSP432_Handle
size_t ringBufSize
Definition: UARTMSP432.h:494
uint16_t rxPin
Definition: UARTMSP432.h:496
Power_NotifyObj perfChangeNotify
Definition: UARTMSP432.h:563
size_t readCount
Definition: UARTMSP432.h:549
Complement set of read functions to be used by the UART ISR and UARTMSP432_read(). Internal use only.
Definition: UARTMSP432.h:381
UART_Callback writeCallback
Definition: UARTMSP432.h:560
The definition of a UART function table that contains the required set of functions to control a spec...
Definition: UART.h:648
UART_DataMode writeDataMode
Definition: UARTMSP432.h:512
HwiP_Handle hwiHandle
Definition: UARTMSP432.h:537
bool drainByISR
Definition: UARTMSP432.h:530
UARTMSP432 Hardware attributes.
Definition: UARTMSP432.h:476
struct UARTMSP432_Object::@0 state
UART driver interface.
const UART_FxnTable UARTMSP432_fxnTable
uint8_t oversampling
Definition: UARTMSP432.h:423
unsigned int readTimeout
Definition: UARTMSP432.h:551
size_t readSize
Definition: UARTMSP432.h:548
int(* readTaskFxn)(UART_Handle handle)
Definition: UARTMSP432.h:383
UART_ReturnMode readReturnMode
Definition: UARTMSP432.h:513
enum UART_STOP_ UART_STOP
UART stop bit settings.
enum UART_ReturnMode_ UART_ReturnMode
UART return mode settings.
unsigned int intPriority
Definition: UARTMSP432.h:482
SemaphoreP_Handle readSem
Definition: UARTMSP432.h:550
uint32_t perfConstraintMask
Definition: UARTMSP432.h:564
UART_STOP stopBits
Definition: UARTMSP432.h:540
Definition: RingBuf.h:44
uint8_t hwRegUCBRFx
Definition: UARTMSP432.h:421
UARTMSP432_FxnSet readFxns
Definition: UARTMSP432.h:546
UART_Callback readCallback
Definition: UARTMSP432.h:552
bool rxEnabled
Definition: UARTMSP432.h:532
UARTMSP432 Object.
Definition: UARTMSP432.h:505
unsigned char * readBuf
Definition: UARTMSP432.h:547
bool(* readIsrFxn)(UART_Handle handle)
Definition: UARTMSP432.h:382
struct UARTMSP432_HWAttrsV1 UARTMSP432_HWAttrsV1
UARTMSP432 Hardware attributes.
bool opened
Definition: UARTMSP432.h:508
struct UARTMSP432_Object UARTMSP432_Object
UARTMSP432 Object.
UART_DataMode readDataMode
Definition: UARTMSP432.h:511
unsigned int intNum
Definition: UARTMSP432.h:480
uint8_t hwRegUCBRSx
Definition: UARTMSP432.h:422
UART_Mode readMode
Definition: UARTMSP432.h:509
void(* UART_Callback)(UART_Handle 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:434
unsigned int writeTimeout
Definition: UARTMSP432.h:559
UARTMSP432_BaudrateConfig const * baudrateLUT
Definition: UARTMSP432.h:490
enum UART_DataMode_ UART_DataMode
UART data mode settings.
size_t writeCount
Definition: UARTMSP432.h:557
Copyright 2016, Texas Instruments Incorporated