UART2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2021, 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  */
32 /*!*****************************************************************************
33  * @file UART2.h
34  * @brief <b>PRELIMINARY</b> UART driver interface
35  *
36  * <b>WARNING</b> These APIs are <b>PRELIMINARY</b>, and subject to
37  * change in the next few months.
38  *
39  * The UART2 driver is an updated version of the UART driver. The name
40  * UART2 was given due to changes in the API, to support backwards
41  * compatibility with applications using the existing UART driver.
42  * Key differences between the UART and UART2 drivers:
43  * - UART2 has both RX and TX ring buffers for receiving/sending data.
44  * - UART2 uses DMA to transfer data between the UART FIFOs and the
45  * RX and TX ring buffers.
46  * - The UART2 APIs for reading and writing data have been made more
47  * posix-like.
48  * - UART2 provides for event notification, allowing the application
49  * to receive TX start and completion events, and RX error events.
50  *
51  * To use the UART2 driver, ensure that the correct driver library for your
52  * device is linked in and include this header file as follows:
53  * @code
54  * #include <ti/drivers/UART2.h>
55  * @endcode
56  *
57  * This module serves as the main interface for applications. Its purpose
58  * is to implement common code between the device specific implementations
59  * of UART2. Any device specific code that differs from the common code is
60  * called through functions prefaced with the "UART2_" naming convention.
61  * These functions are implemented in each device specific implementation.
62  *
63  * @anchor ti_drivers_UART2_Overview
64  * # Overview
65  * A UART is used to translate data between the chip and a serial port.
66  * The UART2 driver simplifies reading and writing to any of the UART
67  * peripherals on the board, with multiple modes of operation and performance.
68  * These include blocking and non-blocking modes.
69  *
70  * The UART2 driver interface provides device independent APIs, data types,
71  * and macros. The APIs in this driver serve as an interface to a typical RTOS
72  * application. The specific peripheral implementations are responsible for
73  * creating all the RTOS specific primitives to allow for thread-safe
74  * operation.
75  *
76  * <hr>
77  * @anchor ti_drivers_UART2_Usage
78  * # Usage
79  *
80  * This documentation provides a basic @ref ti_drivers_UART2_Synopsis
81  * "usage summary" and a set of @ref ti_drivers_UART2_Examples "examples"
82  * in the form of commented code fragments. Detailed descriptions of the
83  * APIs are provided in subsequent sections.
84  *
85  * @anchor ti_drivers_UART2_Synopsis
86  * ## Synopsis
87  * @anchor ti_drivers_UART2_Synopsis_Code
88  * @code
89  * // Import the UART2 driver definitions
90  * #include <ti/drivers/UART2.h>
91  *
92  * // Initialize UART2 parameters
93  * UART2_Params params;
94  * UART2_Params_init(&params);
95  * params.baudRate = 9600;
96  * params.readMode = UART2_Mode_BLOCKING;
97  * params.writeMode = UART2_Mode_BLOCKING;
98  *
99  * // Open the UART
100  * UART2_Handle uart;
101  * uart = UART2_open(CONFIG_UART0, &params);
102  *
103  * // Enable receiver, inhibit low power mode
104  * UART2_rxEnable(uart);
105  *
106  * // Read from the UART.
107  * size_t bytesRead;
108  * uint8_t buffer[BUFSIZE];
109  * int32_t status;
110  * status = UART2_read(uart, buffer, BUFSIZE, &bytesRead);
111  *
112  * // Write to the UART
113  * size_t bytesWritten;
114  * status = UART2_write(uart, buffer, BUFSIZE, &bytesWritten);
115  *
116  * // Close the UART
117  * UART2_close(uart);
118  * @endcode
119  *
120  * <hr>
121  * @anchor ti_drivers_UART2_Examples
122  * # Examples
123  * The following code example opens a UART instance, reads
124  * a byte from the UART, and then writes the byte back to the UART.
125  *
126  * @code
127  * char input;
128  * UART2_Handle uart;
129  * UART2_Params uartParams;
130  *
131  * // Open an instance of the UART2 driver
132  * UART2_Params_init(&uartParams);
133  * uartParams.baudRate = 115200;
134  * uart = UART2_open(CONFIG_UART0, &uartParams);
135  *
136  * if (uart == NULL) {
137  * // UART2_open() failed
138  * while (1);
139  * }
140  *
141  * // Enable receiver, inhibit low power mode
142  * UART2_rxEnable(uart);
143  *
144  * // Loop forever echoing
145  * while (1) {
146  * status = UART2_read(uart, &input, 1, &bytesRead);
147  * status = UART2_write(uart, &input, 1, &bytesWritten);
148  * }
149  * @endcode
150  *
151  * Details for the example code above are described in the following
152  * subsections.
153  *
154  * ### Opening the UART2 Driver #
155  *
156  * Opening a UART requires four steps:
157  * 1. Create and initialize a UART2_Params structure.
158  * 2. Fill in the desired parameters.
159  * 3. Call UART2_open(), passing the index of the UART in the UART2_config
160  * structure, and the address of the UART2_Params structure. The
161  * UART2 instance is specified by the index in the UART2_config structure.
162  * 4. Check that the UART2 handle returned by UART2_open() is non-NULL,
163  * and save it. The handle will be used to read and write to the
164  * UART you just opened.
165  *
166  * Only one UART index can be used at a time; calling UART2_open() a second
167  * time with the same index previosly passed to UART2_open() will result in
168  * an error. You can, though, re-use the index if the instance is closed
169  * via UART2_close().
170  * In the previous example code, CONFIG_UART0 is passed to UART2_open().
171  * This macro is defined in the example's ti_drivers_config.h file.
172  *
173  *
174  * ### Modes of Operation #
175  *
176  * The UART driver can operate in blocking, non-blocking, or callback mode, by
177  * setting the writeMode and readMode parameters passed to UART2_open().
178  * If these parameters are not set, as in the example code, the UART2
179  * driver defaults to blocking mode. Options for the writeMode and
180  * readMode parameters are #UART2_Mode_BLOCKING, #UART2_Mode_NONBLOCKING, and
181  * #UART2_Mode_CALLBACK:
182  *
183  * - #UART2_Mode_BLOCKING uses a semaphore to block while data is being sent,
184  * or while waiting for some data to be received. The context of calling
185  * UART2_read() and UART2_write() in blocking mode must always be a Task.
186  * The UART2_write() call will block until all data has been copied to
187  * the TX circular buffer. The UART2_read() calls can be configured to
188  * have two different behaviors, using the #UART2_ReadReturnMode of the
189  * #UART2_Params. In #UART2_ReadReturnMode_FULL (the default),
190  * UART2_read() will block until the requested number of bytes has been
191  * received. In #UART2_ReadReturnMode_PARTIAL, UART2_read() will block
192  * until either the requested number of bytes has been received,
193  * or a UART hardware read timeout has occurred. Using
194  * UART2_ReadReturnMode_PARTIAL is a good choice if the number of
195  * incoming data bytes is unknown. In UART2_Mode_BLOCKING,
196  * UART2_read() will always return at least some data.
197  * UART2_readTimeout() can be used to specify a timeout in system
198  * clock ticks, to wait for data.
199  * UART2_readTimeout() will return when all data is received, or
200  * the specified timeout expires, or, if using the mode
201  * UART2_ReadReturnMode_PARTIAL, a hardware read timeout occurs,
202  * whichever happens first.
203  *
204  * - #UART2_Mode_NONBLOCKING does not block waiting for data to be sent
205  * or received. UART2_write() and UART2_read() will return immediately
206  * having transferred as much data as the driver can immediately accept
207  * or has available, respectively. If no data can be accepted or
208  * received, UART2_write() and UART2_read() return UART2_STATUS_EAGAIN.
209  *
210  * - #UART2_Mode_CALLBACK is non-blocking and UART2_read() and UART2_write()
211  * will return while data is being sent in the context of a hardware
212  * interrupt. When the read or write finishes, the UART2 driver will call
213  * the user's callback function. In some cases, the UART data transfer
214  * may have been cancelled, so the number of bytes sent/received are
215  * passed to the callback function. Your implementation of the callback
216  * function can use this information as needed.
217  * Since the user's callback may be called in the context of a hardware
218  * interrupt, the callback function must not make any RTOS blocking calls.
219  * The buffer passed to UART2_write() in UART2_Mode_CALLBACK must remain
220  * coherent until all the characters have been sent
221  * (ie until the tx callback has been called with a byte count equal to
222  * that passed to UART2_write()).
223  *
224  * ### Enabling the Receiver #
225  *
226  * The example code enables the collection of data into the RX ring buffer
227  * \a before the first call to UART2_read():
228  *
229  * @code
230  * UART2_rxEnable(uart);
231  * @endcode
232  *
233  * Note that this call is not necessary if the first UART2_read() is called
234  * in time to prevent the RX FIFO from overrun, or if flow control is used.
235  *
236  * ### Reading and Writing Data #
237  *
238  * The example code reads one byte frome the UART instance, and then writes
239  * one byte back to the same instance:
240  *
241  * @code
242  * status = UART2_read(uart, &input, 1, &bytesRead);
243  * status = UART2_write(uart, &input, 1, &bytesWritten);
244  * @endcode
245  *
246  * The UART2 driver allows full duplex data transfers. Therefore, it is
247  * possible to call UART2_read() and UART2_write() at the same time.
248  * It is not possible, however,
249  * to issue multiple concurrent operations in the same direction.
250  * For example, if one thread calls UART2_read(uart0, buffer0...),
251  * any other thread attempting UART2_read(uart0, buffer1...) will result in
252  * an error of UART2_STATUS_EINUSE, until all the data from the first
253  * UART2_read() has been transferred to buffer0. This applies to blocking,
254  * callback, and non-blocking modes. So applications must either synchronize
255  * UART2_read() (or UART2_write()) calls that use the same UART handle, or
256  * check for the UART2_STATUS_EINUSE return code indicating that a transfer is
257  * still ongoing.
258  *
259  * <hr>
260  * @anchor ti_drivers_UART2_Configuration
261  * # Configuration
262  *
263  * Refer to the @ref driver_configuration "Driver's Configuration" section
264  * for driver configuration information.
265  * <hr>
266  *
267  * ============================================================================
268  */
269 
270 #ifndef ti_drivers_UART2__include
271 #define ti_drivers_UART2__include
272 
273 #include <stddef.h>
274 #include <stdint.h>
275 #include <stdbool.h>
276 
277 #include <ti/drivers/dpl/ClockP.h>
278 #include <ti/drivers/dpl/HwiP.h>
279 #include <ti/drivers/dpl/SemaphoreP.h>
281 
282 #ifdef __cplusplus
283 extern "C" {
284 #endif
285 
289 #define UART2_FLOWCTRL_NONE 0
290 
294 #define UART2_FLOWCTRL_HARDWARE 1
295 
302 #define UART2_STATUS_SUCCESS (0)
303 
307 #define UART2_STATUS_SREADTIMEOUT (1)
308 
312 #define UART2_STATUS_EFRAMING (-1)
313 
317 #define UART2_STATUS_EPARITY (-2)
318 
322 #define UART2_STATUS_EBREAK (-4)
323 
327 #define UART2_STATUS_EOVERRUN (-8)
328 
332 #define UART2_STATUS_EINUSE (-9)
333 
337 #define UART2_STATUS_EINVALID (-10)
338 
342 #define UART2_STATUS_EFAIL (-11)
343 
347 #define UART2_STATUS_EMEMORY (-12)
348 
352 #define UART2_STATUS_ETIMEOUT (-13)
353 
357 #define UART2_STATUS_ECANCELLED (-14)
358 
362 #define UART2_STATUS_ENOTOPEN (-15)
363 
368 #define UART2_STATUS_EAGAIN (-16)
369 
379 #define UART2_EVENT_OVERRUN (0x08)
380 
384 #define UART2_EVENT_BREAK (0x04)
385 
389 #define UART2_EVENT_PARITY (0x02)
390 
394 #define UART2_EVENT_FRAMING (0x01)
395 
401 #define UART2_EVENT_TX_BEGIN (0x10)
402 
408 #define UART2_EVENT_TX_FINISHED (0x20)
409 
415 #define UART2_WAIT_FOREVER (~(0U))
416 
420 typedef struct UART2_Config_ *UART2_Handle;
421 
439 typedef void (*UART2_Callback) (UART2_Handle handle, void *buf, size_t count,
440  void *userArg, int_fast16_t status);
441 
463 typedef void (*UART2_EventCallback) (UART2_Handle handle, uint32_t event,
464  uint32_t data, void *userArg);
465 
471 typedef enum {
478 
485 
494  /* Added for backwards compatibility. */
495  UART2_Mode_POLLING = UART2_Mode_NONBLOCKING
497 } UART2_Mode;
498 
514 typedef enum {
517 
521 
527 typedef enum {
532 } UART2_DataLen;
533 
539 typedef enum {
543 
549 typedef enum {
555 } UART2_Parity;
556 
565 typedef struct {
566  UART2_Mode readMode;
567  UART2_Mode writeMode;
571  uint32_t eventMask;
572  UART2_ReadReturnMode readReturnMode;
573  uint32_t baudRate;
577  void *userArg;
578 } UART2_Params;
579 
581 #define UART2_BASE_OBJECT \
582  /* UART2 state variable */ \
583  struct { \
584  uint32_t overrunCount; /* total count of overruns */ \
585  bool opened:1; /* Has the obj been opened */ \
586  UART2_Mode readMode; /* Mode for read calls */ \
587  UART2_Mode writeMode; /* Mode for write calls */ \
588  UART2_ReadReturnMode readReturnMode:1; /* RX return mode (partial/full) */ \
589  bool txEnabled:1; /* Flag set if ongoing transmit */ \
590  bool rxEnabled:1; /* Flag set if ongoing receive */ \
591  bool rxCancelled:1; /* Has the TX been canceled */ \
592  bool txCancelled:1; /* Has the TX been canceled */ \
593  bool readTimedOut:1; /* Has read timed out */ \
594  bool writeTimedOut:1; /* Has write timed out */ \
595  bool overrunActive:1; /* Is a RX overrun active */ \
596  bool inReadCallback:1; /* To avoid stack overflow */ \
597  bool readCallbackPending:1; /* To avoid stack overflow */ \
598  bool inWriteCallback:1; /* To avoid stack overflow */ \
599  bool writeCallbackPending:1; /* To avoid stack overflow */ \
600  } state; \
601  \
602  HwiP_Struct hwi; /* Hwi object for interrupts */ \
603  uint32_t baudRate; /* Baud rate for UART */ \
604  UART2_DataLen dataLength; /* Data length for UART */ \
605  UART2_StopBits stopBits; /* Stop bits for UART */ \
606  UART2_Parity parityType; /* Parity bit type for UART */ \
607  int32_t rxStatus; /* RX status */ \
608  int32_t txStatus; /* TX status */ \
609  UART2_EventCallback eventCallback; /* User supplied event callback */ \
610  uint32_t eventMask; /* User supplied event mask */ \
611  void *userArg; /* User supplied arg for callbacks */ \
612  \
613  /* UART read variables */ \
614  RingBuf_Object rxBuffer; /* Receive ring buffer */ \
615  bool readInUse; /* Is a read() active */ \
616  unsigned char *readBuf; /* Buffer data pointer */ \
617  size_t readSize; /* Number of bytes to read */ \
618  uint32_t nReadTransfers; /* Number of DMA transfers needed */ \
619  size_t readCount; /* Number of bytes left to read */ \
620  size_t rxSize; /* # of bytes to read in DMA xfer */ \
621  size_t bytesRead; /* Number of bytes read */ \
622  SemaphoreP_Struct readSem; /* UART read semaphore */ \
623  ClockP_Struct readTimeoutClk; /* Clock object to for timeouts */ \
624  UART2_Callback readCallback; /* Pointer to read callback */ \
625  \
626  /* UART write variables */ \
627  RingBuf_Object txBuffer; /* Transmit ring buffer */ \
628  volatile bool writeInUse; /* Flag to show ongoing write */ \
629  const unsigned char *writeBuf; /* Buffer data pointer */ \
630  size_t writeSize; /* Number of bytes to write*/ \
631  uint32_t nWriteTransfers; /* Number of DMA transfers needed */\
632  size_t writeCount; /* Number of bytes left to write */ \
633  size_t txSize; /* # of bytes to write with DMA */ \
634  size_t bytesWritten; /* Number of bytes written */ \
635  SemaphoreP_Struct writeSem; /* UART write semaphore*/ \
636  ClockP_Struct writeTimeoutClk; /* Clock object to for timeouts */ \
637  UART2_Callback writeCallback; /* Pointer to write callback */ \
638  \
639  /* For Power management */ \
640  unsigned int powerMgrId; /* Determined from base address */ \
641 
648 typedef struct {
649  UART2_BASE_OBJECT
650 } UART2_Object;
654 #define UART2_BASE_HWATTRS \
655  \
656  uint32_t baseAddr; \
657  \
658  int intNum; \
659  \
660  uint8_t intPriority; \
661  \
662  unsigned char *rxBufPtr; \
663  \
664  size_t rxBufSize; \
665  \
666  unsigned char *txBufPtr; \
667  \
668  size_t txBufSize; \
669  \
670  uint32_t flowControl; \
671  \
672  uint32_t rxPin; \
673  \
674  uint32_t txPin; \
675  \
676  uint32_t ctsPin; \
677  \
678  uint32_t rtsPin; \
679 
685 typedef struct {
686  UART2_BASE_HWATTRS
687 } UART2_HWAttrs;
697 typedef struct UART2_Config_ {
699  void *object;
700 
702  void const *hwAttrs;
703 } UART2_Config;
704 
705 extern const UART2_Config UART2_config[];
706 extern const uint_least8_t UART2_count;
707 
720 extern void UART2_close(UART2_Handle handle);
721 
733 extern void UART2_flushRx(UART2_Handle handle);
734 
747 extern size_t UART2_getRxCount(UART2_Handle handle);
748 
764 extern UART2_Handle UART2_open(uint_least8_t index, UART2_Params *params);
765 
787 
856 extern int_fast16_t UART2_read(UART2_Handle handle, void *buffer, size_t size,
857  size_t *bytesRead);
858 
860 extern int_fast16_t __attribute__((weak)) UART2_readFull(UART2_Handle handle,
861  void *buffer, size_t size, size_t *bytesRead);
943 extern int_fast16_t UART2_readTimeout(UART2_Handle handle, void *buffer,
944  size_t size, size_t *bytesRead, uint32_t timeout);
945 
967 extern void UART2_readCancel(UART2_Handle handle);
968 
1024 extern int_fast16_t UART2_write(UART2_Handle handle, const void *buffer,
1025  size_t size, size_t *bytesWritten);
1026 
1041 extern void UART2_rxDisable(UART2_Handle handle);
1042 
1057 extern void UART2_rxEnable(UART2_Handle handle);
1058 
1123 extern int_fast16_t UART2_writeTimeout(UART2_Handle handle, const void *buffer,
1124  size_t size, size_t *bytesWritten, uint32_t timeout);
1125 
1146 extern void UART2_writeCancel(UART2_Handle handle);
1147 
1148 #ifdef __cplusplus
1149 }
1150 #endif
1151 
1152 #endif /* ti_drivers_UART2__include */
UART2 Global configuration.
Definition: UART2.h:697
int_fast16_t UART2_readTimeout(UART2_Handle handle, void *buffer, size_t size, size_t *bytesRead, uint32_t timeout)
Function that reads data from a UART, with a specified timeout for blocking mode. ...
Definition: UART2.h:528
ADC_Params params
Definition: Driver_Init.h:11
UART2_ReadReturnMode
UART2 return mode settings.
Definition: UART2.h:514
const uint_least8_t UART2_count
void UART2_readCancel(UART2_Handle handle)
Function that cancels a UART2_read() function call.
UART2_ReadReturnMode readReturnMode
Definition: UART2.h:572
Definition: UART2.h:484
size_t UART2_getRxCount(UART2_Handle handle)
Get the number of bytes available in the circular buffer.
UART2_Parity
UART2 parity type settings.
Definition: UART2.h:549
const UART2_Config UART2_config[]
int_fast16_t UART2_write(UART2_Handle handle, const void *buffer, size_t size, size_t *bytesWritten)
Function that writes data to a UART.
Definition: UART2.h:553
Definition: UART2.h:540
Definition: UART2.h:551
UART2_Callback readCallback
Definition: UART2.h:568
void * userArg
Definition: UART2.h:577
Definition: UART2.h:529
Definition: UART2.h:516
struct UART2_Config_ * UART2_Handle
A handle that is returned from a UART2_open() call.
Definition: UART2.h:420
Definition: UART2.h:531
void const * hwAttrs
Definition: UART2.h:702
uint32_t eventMask
Definition: UART2.h:571
UART2_StopBits stopBits
Definition: UART2.h:575
void * object
Definition: UART2.h:699
UART2_Mode writeMode
Definition: UART2.h:567
void(* UART2_EventCallback)(UART2_Handle handle, uint32_t event, uint32_t data, void *userArg)
The definition of a callback function used by the UART driver. The callback can occur in task or inte...
Definition: UART2.h:463
UART2_Parity parityType
Definition: UART2.h:576
Definition: UART2.h:477
Definition: UART2.h:530
void UART2_flushRx(UART2_Handle handle)
Function to flush data in the UART RX FIFO.
UART2_Mode
UART2 mode settings.
Definition: UART2.h:471
UART2_Handle UART2_open(uint_least8_t index, UART2_Params *params)
Function to initialize a given UART peripheral.
void UART2_close(UART2_Handle handle)
Function to close a UART peripheral specified by the UART2 handle.
void UART2_rxDisable(UART2_Handle handle)
Function that disables collecting of RX data into the circular buffer.
Definition: UART2.h:541
UART2_Callback writeCallback
Definition: UART2.h:569
UART2 Parameters.
Definition: UART2.h:565
struct UART2_Config_ UART2_Config
UART2 Global configuration.
Definition: UART2.h:552
UART2_StopBits
UART2 stop bit settings.
Definition: UART2.h:539
void UART2_Params_init(UART2_Params *params)
Function to initialize the UART2_Params struct to its defaults.
UART2_DataLen dataLength
Definition: UART2.h:574
int_fast16_t UART2_read(UART2_Handle handle, void *buffer, size_t size, size_t *bytesRead)
Function that reads data from a UART.
void UART2_rxEnable(UART2_Handle handle)
Function that enables collecting of RX data into the circular buffer.
UART2_EventCallback eventCallback
Definition: UART2.h:570
int_fast16_t UART2_writeTimeout(UART2_Handle handle, const void *buffer, size_t size, size_t *bytesWritten, uint32_t timeout)
Function that writes data to a UART, with a specified timeout.
Definition: UART2.h:550
Definition: UART2.h:492
Definition: UART2.h:519
void(* UART2_Callback)(UART2_Handle handle, void *buf, size_t count, void *userArg, int_fast16_t status)
The definition of a callback function used by the UART2 driver when used in UART2_Mode_CALLBACK The c...
Definition: UART2.h:439
UART2_Mode readMode
Definition: UART2.h:566
Definition: UART2.h:554
UART2_DataLen
UART2 data length settings.
Definition: UART2.h:527
void UART2_writeCancel(UART2_Handle handle)
Function that cancels a UART2_write() function call.
uint32_t baudRate
Definition: UART2.h:573
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale