view serial.h @ 0:6dfcd8e5b8df

first release
author Frank Kingswood <frank@kingswood-consulting.co.uk>
date Tue, 25 Mar 2014 20:31:00 +0000
parents
children
line wrap: on
line source
1 /* #------------------------------------------------------------------------#
2 | |
3 | serial.h |
4 | |
5 | Debugging (transmit only) serial port. |
6 | |
7 | Copyright 2014, Frank A. Kingswood, www.kingswood-consulting.co.uk |
8 | |
9 #------------------------------------------------------------------------# */
11 #ifndef SERIAL_H_
12 #define SERIAL_H_
14 #include "formatting.h"
15 //#define static_assert(COND) do { typedef char static_assertion[(COND)?1:-1]; } while(0)
17 class DebugSerial:public Formatting<DebugSerial>
18 {
19 public:
20 // public methods
21 DebugSerial();
22 static void Initialize();
24 static __attribute__((noinline)) void Send_(char c);
25 private:
26 static void delay();
27 };
29 extern const DebugSerial Serial;
31 #endif /* SERIAL_H_ */