34 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /**
 | |
| 	@brief Source code of debug function.\n
 | |
| 	This file contains the debug function, and debug menu entry point.
 | |
| 
 | |
| 	@file hd_debug_int.h
 | |
| 
 | |
| 	@ingroup mhdal
 | |
| 
 | |
| 	@note Nothing.
 | |
| 
 | |
| 	Copyright Novatek Microelectronics Corp. 2018.  All rights reserved.
 | |
| */
 | |
| #ifndef _HD_DEBUG_INT_H_
 | |
| #define _HD_DEBUG_INT_H_
 | |
| 
 | |
| #include "hd_debug.h"
 | |
| #include "hd_logger.h"
 | |
| #include "hd_debug_menu.h"
 | |
| 
 | |
| #define HD_MODULE_NAME HD_DEBUG
 | |
| #define DBG_ERR(fmtstr, args...) HD_LOG_BIND(HD_MODULE_NAME, _ERR)("\033[1;31m" fmtstr "\033[0m", ##args)
 | |
| #define DBG_WRN(fmtstr, args...) HD_LOG_BIND(HD_MODULE_NAME, _WRN)("\033[1;33m" fmtstr "\033[0m", ##args)
 | |
| #define DBG_IND(fmtstr, args...) HD_LOG_BIND(HD_MODULE_NAME, _IND)(fmtstr, ##args)
 | |
| #define DBG_DUMP(fmtstr, args...) HD_LOG_BIND(HD_MODULE_NAME, _MSG)(fmtstr, ##args)
 | |
| #define DBG_FUNC_BEGIN(fmtstr, args...) HD_LOG_BIND(HD_MODULE_NAME, _FUNC)("BEGIN: " fmtstr, ##args)
 | |
| #define DBG_FUNC_END(fmtstr, args...) HD_LOG_BIND(HD_MODULE_NAME, _FUNC)("END: " fmtstr, ##args)
 | |
| 
 | |
| typedef struct _HD_DBG_CMD_DESC {
 | |
| 	HD_DEBUG_PARAM_ID idx;
 | |
| 	HD_RESULT(*p_func)(void *p_data);
 | |
| } HD_DBG_CMD_DESC;
 | |
| 
 | |
| #endif
 | 
