Dependents:   SimpleLCDClock readCard2Twitter_http AnalogClock_StepperMotor_NTP ServoCamV1

dbg/dbg.h

Committer:
donatien
Date:
2010-05-24
Revision:
0:3717b703f76d
Child:
1:e52ec2a24c6a

File content as of revision 0:3717b703f76d:

//#ifdef DBG_H
//#define DBG_H

#ifdef __LWIP_DEBUG
#define __DEBUG
#endif

#ifdef __DEBUG

#ifndef __DEBUGSTREAM
#define __DEBUGSTREAM


class DebugStream
{
public:
static void debug(const char* format, ...);
static void release();
private:

};

#undef DBG
#undef DBG_END
#define DBG DebugStream::debug
#define DBG_END DebugStream::release
#endif

#else
#undef DBG
#undef DBG_END
#define DBG(...)
#define DBG_END()
#endif

#ifdef __LWIP_DEBUG
#ifndef __SNPRINTF
#define __SNPRINTF
#include "mbed.h"

//int snprintf(char *str, int size, const char *format, ...);
#endif
#endif

#ifdef __LWIP_DEBUG
#undef __DEBUG
#endif

//#endif