mcu_hi3321_watch/tjd/driver/debug/debug_api.c
2025-05-26 20:15:20 +08:00

56 lines
1.3 KiB
C

/*----------------------------------------------------------------------------
* Copyright (c) Fenda Technologies Co., Ltd. 2020. All rights reserved.
*
* Description: debug_api.c
*
* Author: saimen
*
* Create: 2020-12-16
*--------------------------------------------------------------------------*/
//lib
#include <string.h>
//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.
//
//*****************************************************************************