Parola for Arduino  1.0
Text effects for Parola modular hardware
MD_Parola_lib.h
1 
2 #ifndef MD_PAROLALIB_H
3 #define MD_PAROLALIB_H
4 
5 #define DEBUG_PAROLA 0
6 #define DEBUG_PAROLA_FSM 0
7 #define TIME_PROFILING 0
8 
9 #if DEBUG_PAROLA
10 #define PRINT(s, v) { Serial.print(F(s)); Serial.print(v); }
11 #define PRINTX(s, v) { Serial.print(F(s)); Serial.print(v, HEX); }
12 #define PRINTS(s) Serial.print(F(s))
13 #else
14 #define PRINT(s, v)
15 #define PRINTX(s, v)
16 #define PRINTS(s)
17 #endif
18 
19 #if DEBUG_PAROLA_FSM
20 #define FSMPRINT(s, v) { Serial.print(F(s)); Serial.print(v); }
21 #define FSMPRINTX(s, v) { Serial.print(F(s)); Serial.print(v, HEX); }
22 #define FSMPRINTS(s) Serial.print(F(s))
23 #define PRINT_STATE(f) { Serial.print(F("\n")); Serial.print(F(f)); Serial.print(F(" fsm ")); Serial.print(_fsmState); }
24 #else
25 #define FSMPRINT(s, v)
26 #define FSMPRINTX(s, v)
27 #define FSMPRINTS(s)
28 #define PRINT_STATE(f)
29 #endif
30 
31 #if TIME_PROFILING
32 #define TIME_PROFILE(s) { Serial.print(F(s)); Serial.print(millis()-_lastRunTime); }
33 #else
34 #define TIME_PROFILE(s)
35 #endif
36 
37 // General macros and defines
38 #define LIGHTBAR 0xFF // all LEDs on
39 
40 #endif