diff options
-rw-r--r-- | platform/utilities/inc/debug_console_imx.h | 4 | ||||
-rw-r--r-- | platform/utilities/src/debug_console_imx.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/platform/utilities/inc/debug_console_imx.h b/platform/utilities/inc/debug_console_imx.h index bb14a67..21069b8 100644 --- a/platform/utilities/inc/debug_console_imx.h +++ b/platform/utilities/inc/debug_console_imx.h @@ -86,11 +86,13 @@ extern "C" { * @param base Which UART_IMX instance is used to send debug messages. * @param clockRate The input clock of UART_IMX module. * @param baudRate The desired baud rate in bits per second. + * @param mode The Modem mode (DTE/DCE), (see _uart_modem_mode enumeration). * @return Whether initialization was successful or not. */ debug_console_status_t DbgConsole_Init(UART_Type* base, uint32_t clockRate, - uint32_t baudRate); + uint32_t baudRate, + uint32_t mode); /*! * @brief Deinit the UART/LPUART used for debug messages. diff --git a/platform/utilities/src/debug_console_imx.c b/platform/utilities/src/debug_console_imx.c index edc35ae..93c9a3c 100644 --- a/platform/utilities/src/debug_console_imx.c +++ b/platform/utilities/src/debug_console_imx.c @@ -74,7 +74,8 @@ static debug_console_state_t s_debugConsole; /* See fsl_debug_console_imx.h for documentation of this function.*/ debug_console_status_t DbgConsole_Init(UART_Type* base, uint32_t clockRate, - uint32_t baudRate) + uint32_t baudRate, + uint32_t mode) { if (s_debugConsole.inited) { @@ -92,6 +93,7 @@ debug_console_status_t DbgConsole_Init(UART_Type* base, /* UART Init operation */ UART_Init(s_debugConsole.base, &uart_init_str); UART_Enable(s_debugConsole.base); + UART_SetModemMode(s_debugConsole.base, mode); /* Set the function pointer for send and receive for this kind of device. */ s_debugConsole.ops.Send = UART_SendDataPolling; s_debugConsole.ops.Receive = UART_ReceiveDataPolling; |