Go to the documentation of this file.
22 #ifndef _FSL_DEBUGCONSOLE_H_
23 #define _FSL_DEBUGCONSOLE_H_
40 #define DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN 0U
41 #define DEBUGCONSOLE_REDIRECT_TO_SDK 1U
42 #define DEBUGCONSOLE_DISABLE 2U
47 #ifndef SDK_DEBUGCONSOLE
48 #define SDK_DEBUGCONSOLE 1U
51 #if defined(SDK_DEBUGCONSOLE) && !(SDK_DEBUGCONSOLE)
61 #if SDK_DEBUGCONSOLE == DEBUGCONSOLE_DISABLE
70 #define PUTCHAR(...) \
75 #elif SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_SDK
76 #define PRINTF DbgConsole_Printf
77 #define SCANF DbgConsole_Scanf
78 #define PUTCHAR DbgConsole_Putchar
79 #define GETCHAR DbgConsole_Getchar
80 #elif SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN
84 #define PUTCHAR putchar
85 #define GETCHAR getchar
92 #if defined(__cplusplus)
99 #if ((SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_SDK) || defined(SDK_DEBUGCONSOLE_UART))
232 #ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
240 status_t DbgConsole_TryGetchar(
char *ch);
247 #if defined(__cplusplus)
status_t DbgConsole_Flush(void)
Debug console flush.
enum _serial_port_type serial_port_type_t
serial port type
void * serial_handle_t
The handle of the serial manager module.
int DbgConsole_Getchar(void)
Reads a character from standard input.
int DbgConsole_Printf(const char *formatString,...)
Writes formatted output to the standard output stream.
status_t DbgConsole_Deinit(void)
De-initializes the peripheral used for debug messages.
serial_handle_t g_serialHandle
int DbgConsole_Putchar(int ch)
Writes a character to stdout.
status_t DbgConsole_Init(uint8_t instance, uint32_t baudRate, serial_port_type_t device, uint32_t clkSrcFreq)
Initializes the peripheral used for debug messages.
int DbgConsole_BlockingPrintf(const char *formatString,...)
Writes formatted output to the standard output stream with the blocking mode.
int DbgConsole_Scanf(char *formatString,...)
Reads formatted data from the standard input stream.
int32_t status_t
Type used for all status and error return values.