Implemented first Hangar-Service

Dependencies:   CalibrateMagneto QuaternionMath

Fork of SML2 by TobyRich GmbH

Logger.h

Committer:
pvaibhav
Date:
2015-01-13
Revision:
0:943820483318
Child:
1:c279bc3af90c

File content as of revision 0:943820483318:

#ifndef _H_LOGGER_H
#define _H_LOGGER_H

#include <cstdio>
#ifdef DEBUG
static Serial sml2uart(p26, p24);
#define LOG(x, ...)  { sml2uart.printf("[  %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); }
#define WARN(x, ...) { sml2uart.printf("[W %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); }
#define ERR(x, ...)  { sml2uart.printf("[E %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); }
#define INFO(x, ...) { sml2uart.printf("[i %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); }
#else
#define LOG(x, ...)
#define WARN(x, ...)
#define ERR(x, ...)
#define INFO(x, ...)
#endif

#endif//_H_LOGGER_H