Fixed WDT timer code, still not dynamic

This commit is contained in:
Ziver Koc 2016-05-09 17:49:24 +02:00
parent 2ba3c42a5e
commit 20023c48e0
5 changed files with 69 additions and 30 deletions

View file

@ -1,6 +1,22 @@
#ifndef HALINTERFACES_H
#define HALINTERFACES_H
#include "HalConfiguration.h"
#ifdef ENABLE_DEBUG
#define DEBUG(msg) \
Serial.println(msg); \
Serial.flush();
#define DEBUGF(msg, ...) \
static char buffer[80];\
snprintf(buffer, sizeof(buffer), msg, __VA_ARGS__);\
Serial.println(buffer);\
Serial.flush();
#else
#define DEBUG(msg)
#define DEBUGF(msg, ...)
#endif
class Sensor
{