#ifndef _COMMON_H_
#define _COMMON_H_

#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "SEGGER_RTT.h"

//#define DEBUG_PRINTF

#ifdef DEBUG_PRINTF
#define debugPrintInit()            SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL)
#define debugPrintf(chan, format, ...) SEGGER_RTT_printf(chan, "Line:%5d, func:<%s> : "format"", __LINE__, __FUNCTION__, ##__VA_ARGS__)
#define debugPrintfNoFile(chan, format, ...) SEGGER_RTT_printf(chan, ""format"", ##__VA_ARGS__)
#else
#define debugPrintInit()
#define debugPrintf(...) 
#define debugPrintfNoFile( ...)

#endif



#endif

