/*
 *debug.h
 *Author: liujian
 */

#ifndef SRC_DEBUG_H_
#define SRC_DEBUG_H_

#include "brom_func.h"
#include "board.h"


void debug_uart_init(void);

#ifdef USING_BOARD_DBUART
    	#define debug(fmt,...)  brom_func->printf(fmt,##__VA_ARGS__)
    	void debug_puts_hex(uint8_t *addr, uint32_t len);
    	void show_uart_wave(uint16_t ch0, uint16_t ch1, uint16_t ch2, uint16_t ch3, uint16_t ch4);
#else

    #define debug      printk

#endif

#ifdef USING_BOARD_USB_CDC
	#define cdc_debug          usbd_cdc_vcom_print
#else
	#define cdc_debug          free_debug
#endif

void algo_printf(char* fmt, ...);
#endif /* SRC_DEBUG_H_ */
