25 virtual int available() = 0;
26 virtual int read() = 0;
27 virtual int peek() = 0;
28 virtual void flush() = 0;
31 virtual size_t write(uint8_t c
) = 0;
32 virtual size_t write(uint8_t *s
, int l
) = 0;
35 class HardwareSerial
: public Stream
{
38 int available() {return 0;}
39 int read() {return -1;}
40 int peek() {return 0;}
43 void begin(int baud
) {}
44 void enableHalfDuplexRx() {}
47 size_t write(uint8_t c
) {return 1;}
48 size_t write(uint8_t *s
, int l
) {return l
;}
50 int print(const char *s
) {return 0;}
51 int print(uint8_t s
) {return 0;}
52 int print(uint8_t s
, int radix
) {return 0;}
53 int println() {return 0;}
54 int println(const char *s
) {return 0;}
55 int println(uint8_t s
) {return 0;}
56 int println(uint8_t s
, int radix
) {return 0;}
59 static HardwareSerial Serial
;
61 inline void interrupts() {}
62 inline void noInterrupts() {}
64 inline unsigned long micros() {
66 gettimeofday(&tv
,NULL
);
67 return tv
.tv_sec
*(uint64_t)1000000+tv
.tv_usec
;
70 inline void delay(int32_t time
) {
75 inline unsigned long millis() { return 0; }
76 inline void delayMicroseconds(int delay
) { }
78 const char device_name
[] = "testing";
79 const uint8_t device_name_size
= sizeof(device_name
);