USB Host Shield 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
message.h
Go to the documentation of this file.
1 /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
2 
3 This software may be distributed and modified under the terms of the GNU
4 General Public License version 2 (GPL2) as published by the Free Software
5 Foundation and appearing in the file GPL2.TXT included in the packaging of
6 this file. Please note that GPL2 Section 2[b] requires that all works based
7 on this software must also be made publicly available under the terms of
8 the GPL2 ("Copyleft").
9 
10 Contact information
11 -------------------
12 
13 Circuits At Home, LTD
14 Web : http://www.circuitsathome.com
15 e-mail : support@circuitsathome.com
16 */
17 #if !defined(__MESSAGE_H__)
18 #define __MESSAGE_H__
19 
20 #include <inttypes.h>
21 #include <avr/pgmspace.h>
22 #include "printhex.h"
23 
24 void Notify(char const * msg);
25 //void Notify(const char* msg);
26 
27 template <class ERROR_TYPE>
28 void ErrorMessage(char const * msg, ERROR_TYPE rcode = 0)
29 {
30  Notify(msg);
31  Notify(PSTR(": "));
32  PrintHex<ERROR_TYPE>(rcode);
33  Notify(PSTR("\r\n"));
34 }
35 
36 
37 #endif // __MESSAGE_H__