17 #if !defined(__MESSAGE_H__)
24 #ifndef USB_HOST_SERIAL
25 #define USB_HOST_SERIAL Serial
29 #include <avr/pgmspace.h>
34 void E_Notify(
char const * msg,
int lvl);
40 #define Notify E_Notify
41 #define NotifyStr E_NotifyStr
42 #define Notifyc E_Notifyc
53 #define Notify(...) ((void)0)
54 #define NotifyStr(...) ((void)0)
55 #define Notifyc(...) ((void)0)
56 #define NotifyFailGetDevDescr(...) ((void)0)
57 #define NotifyFailSetDevTblEntry(...) ((void)0)
58 #define NotifyFailGetConfDescr(...) ((void)0)
59 #define NotifyFailGetDevDescr(...) ((void)0)
60 #define NotifyFailSetDevTblEntry(...) ((void)0)
61 #define NotifyFailGetConfDescr(...) ((void)0)
62 #define NotifyFailSetConfDescr(...) ((void)0)
63 #define NotifyFailUnknownDevice(...) ((void)0)
64 #define NotifyFail(...) ((void)0)
67 template <
class ERROR_TYPE>
68 void ErrorMessage(uint8_t level,
char const * msg, ERROR_TYPE rcode = 0) {
72 PrintHex<ERROR_TYPE > (rcode, level);
73 Notify(PSTR(
"\r\n"), level);
77 template <
class ERROR_TYPE>
82 PrintHex<ERROR_TYPE > (rcode, 0x80);
83 Notify(PSTR(
"\r\n"), 0x80);
89 #endif // __MESSAGE_H__