blob: 6d85caf2d8a17c5002d9e3564cd94a2c99950bb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#include "USBAPI.h"
void NullSerial::begin(uint16_t baud_count)
{
}
void NullSerial::end(void)
{
}
void NullSerial::accept(void)
{
}
int NullSerial::available(void)
{
return 0;
}
int NullSerial::peek(void)
{
return -1;
}
int NullSerial::read(void)
{
return -1;
}
void NullSerial::flush(void)
{
}
size_t NullSerial::write(uint8_t c)
{
return 1;
}
NullSerial::operator bool() {
return true;
}
NullSerial Serial;
|