/*---------------------------------------------------------------------------- * Copyright (c) Fenda Technologies Co., Ltd. 2020. All rights reserved. * * Description: debug_api.c * * Author: saimen * * Create: 2020-12-16 *--------------------------------------------------------------------------*/ //lib #include //os //sdk #include "am_util.h" //drv #include "sys_config.h" #include "debug_port.h" #include "debug_api.h" //***************************************************************************** // // Enable printing to the console. // //***************************************************************************** void debug_api_init (void) { #if (USED_DBG_COM == DBG_COM_SWO) // // Initialize a debug printing interface. // am_bsp_itm_printf_enable(); #endif #if (USED_DBG_COM == DBG_COM_UART) debug_port_uart_enable(); #endif // am_util_stdio_terminal_clear(); } void debug_api_deinit (void) { #if (USED_DBG_COM == DBG_COM_SWO) debug_port_itm_disable(); #endif #if (USED_DBG_COM == DBG_COM_UART) debug_port_uart_disable(); #endif } //***************************************************************************** // // End Doxygen group. // //*****************************************************************************