Add tlmConfirm to tlm_dl ota packet-structure (#2991)
[ExpressLRS.git] / src / include / helpers.h
blob2aea12c579ff2ff6f7aa7defcbc1dcd21da1e433
1 #pragma once
3 #include "targets.h"
5 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
7 #ifndef UNUSED
8 #define UNUSED(x) (void)(x)
9 #endif
11 class NullStream : public Stream
13 public:
14 int available() override
16 return 0;
19 void flush() override
23 int peek() override
25 return -1;
28 int read() override
30 return -1;
33 size_t write(uint8_t u_Data) override
35 UNUSED(u_Data);
36 return 0x01;
39 size_t write(const uint8_t *buffer, size_t size) override
41 UNUSED(buffer);
42 return size;