debug.h 627 Bytes
Newer Older
João Lino's avatar
Rel.3  
João Lino committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/*
  debug.h - Debug functions.
  Created by João Lino, September 25, 2015.
  Released into the public domain.
*/

#ifndef DEBUG_h
#define DEBUB_h

// ######################### TEMPLATES #########################
template <class T> void debugPrintVar( char *name, const T& value );
template <class T> void debugPrintVar( char *name, const T& value ) {
  Serial.print("[");
  Serial.print(name);
  Serial.print(":");
  Serial.print(value);
  Serial.println("]");
}
void debugPrintFunction( char *name ) {
  Serial.print("++++++++++++++++++++++++ ");
  Serial.print(name);
  Serial.println("++++++++++++++++++++++++");
}

#endif