PDK API Guide for AM64x
UART_stdio.h
Go to the documentation of this file.
1 
8 /*
9  * Copyright (c) 2014-2015, Texas Instruments Incorporated
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  *
16  * * Redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer.
18  *
19  * * Redistributions in binary form must reproduce the above copyright
20  * notice, this list of conditions and the following disclaimer in the
21  * documentation and/or other materials provided with the distribution.
22  *
23  * * Neither the name of Texas Instruments Incorporated nor the names of
24  * its contributors may be used to endorse or promote products derived
25  * from this software without specific prior written permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
29  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
31  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
34  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
36  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
37  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  */
39 
40 #ifndef UARTSTDIO_H_
41 #define UARTSTDIO_H_
42 
43 #include <stdint.h>
44 #include <stdarg.h>
45 
46 #include <ti/drv/uart/UART.h>
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /****************************************************************************
52 ** MACRO DEFINITIONS
53 ****************************************************************************/
54 
55 #ifndef E_PASS
56 #define E_PASS ((int32_t)(0))
57 #endif
58 #ifndef E_FAIL
59 #define E_FAIL (-((int32_t)1))
60 #endif
61 
62 #define S_PASS (0)
63 /****************************************************************************
64 ** FUNCTION PROTOTYPES
65 ****************************************************************************/
66 
102 uint32_t UART_puts(const char *pTxBuffer, int32_t numBytesToWrite);
103 
132 uint32_t UART_gets(char *pRxBuffer, int32_t numBytesToRead);
133 
134 
159 int32_t UART_dataWrite(const char *pcBuf, uint32_t ulLen);
160 
197 void UART_printf(const char *pcString, ...);
198 
199 void UART_putc(uint8_t byteTx);
200 
201 
202 uint8_t UART_getc(void);
203 
215 void UART_stdioInit2(uint32_t instance,UART_Params *uartParams);
216 
226 void UART_stdioInit(uint32_t value);
227 
228 
245 int32_t UART_scanFmt(const char *pString, ...);
246 
254 void UART_stdioDeInit(void);
255 
265 void UART_printStatus(const char *statusString);
266 
267 #ifdef __cplusplus
268 }
269 #endif
270 #endif
void UART_stdioInit(uint32_t value)
This function initializes the specified UART instance for use for console operations.
void UART_printStatus(const char *statusString)
This function prints the status on the UART instance that is opened for console operations.
void UART_putc(uint8_t byteTx)
uint8_t UART_getc(void)
uint32_t UART_puts(const char *pTxBuffer, int32_t numBytesToWrite)
This function writes data from a specified buffer onto the transmitter FIFO of UART.
int32_t UART_dataWrite(const char *pcBuf, uint32_t ulLen)
uint32_t UART_gets(char *pRxBuffer, int32_t numBytesToRead)
This function reads data from the receiver FIFO to a buffer in the receiver.
void UART_stdioInit2(uint32_t instance, UART_Params *uartParams)
This function initializes the specified UART instance for use for console operations ,...
void UART_printf(const char *pcString,...)
void UART_stdioDeInit(void)
This function de-initializes the UART instance that is opened for console operations.
Basic UART Parameters.
Definition: UART.h:373
int32_t UART_scanFmt(const char *pString,...)
This function shall read the formatted input from UART console. Format specifier follows %[fill][widt...
UART driver interface.