15 #define DEVICE_NAME "testing"
16 #define RADIO_SX128X 1
30 virtual int available() = 0;
31 virtual int read() = 0;
32 virtual int peek() = 0;
33 virtual void flush() = 0;
36 virtual size_t write(uint8_t c
) = 0;
37 virtual size_t write(const uint8_t *s
, size_t l
) = 0;
39 int print(const char *s
) {return 0;}
40 int print(uint8_t s
) {return 0;}
41 int print(uint8_t s
, int radix
) {return 0;}
42 int println() {return 0;}
43 int println(const char *s
) {return 0;}
44 int println(uint8_t s
) {return 0;}
45 int println(uint8_t s
, int radix
) {return 0;}
48 class HardwareSerial
: public Stream
{
51 int available() {return 0;}
52 int read() {return -1;}
53 int peek() {return 0;}
56 void begin(int baud
) {}
57 void enableHalfDuplexRx() {}
58 int availableForWrite() {return 256;}
61 size_t write(uint8_t c
) {return 1;}
62 size_t write(const uint8_t *s
, size_t l
) {return l
;}
64 int print(const char *s
) {return 0;}
65 int print(uint8_t s
) {return 0;}
66 int print(uint8_t s
, int radix
) {return 0;}
67 int println() {return 0;}
68 int println(const char *s
) {return 0;}
69 int println(uint8_t s
) {return 0;}
70 int println(uint8_t s
, int radix
) {return 0;}
73 static HardwareSerial Serial
;
74 static Stream
*SerialLogger
= &Serial
;
76 inline void interrupts() {}
77 inline void noInterrupts() {}
79 inline unsigned long micros() {
81 gettimeofday(&tv
,NULL
);
82 return tv
.tv_sec
*(uint64_t)1000000+tv
.tv_usec
;
85 inline void delay(int32_t time
) {
89 inline unsigned long millis() { return 0; }
90 inline void delayMicroseconds(int delay
) { }
91 inline char *itoa(int32_t value
, char *str
, int base
) { sprintf(str
, "%d", value
); return str
; }
92 inline char *utoa(uint32_t value
, char *str
, int base
) { sprintf(str
, "%u", value
); return str
; }
93 #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))