]> git.gir.st - tmk_keyboard.git/blob - tmk_core/protocol/usb_hid/override_Serial.cpp
Merge commit 'a074364c3731d66b56d988c8a6c960a83ea0e0a1' as 'tmk_core'
[tmk_keyboard.git] / tmk_core / protocol / usb_hid / override_Serial.cpp
1 /*
2 * Null implementation of Serial to dump debug print into blackhole
3 */
4 #include "Arduino.h"
5 #include "sendchar.h"
6
7 #include "USBAPI.h"
8
9
10 void Serial_::begin(uint16_t baud_count)
11 {
12 }
13
14 void Serial_::end(void)
15 {
16 }
17
18 void Serial_::accept(void)
19 {
20 }
21
22 int Serial_::available(void)
23 {
24 return 0;
25 }
26
27 int Serial_::peek(void)
28 {
29 return -1;
30 }
31
32 int Serial_::read(void)
33 {
34 return -1;
35 }
36
37 void Serial_::flush(void)
38 {
39 }
40
41 size_t Serial_::write(uint8_t c)
42 {
43 sendchar(c);
44 return 1;
45 }
46
47 Serial_::operator bool() {
48 return true;
49 }
50
51 Serial_ Serial;
Imprint / Impressum