We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f6c4516 + c82699a commit 5f31ffeCopy full SHA for 5f31ffe
libraries/Wire/src/Wire.h
@@ -27,10 +27,11 @@
27
#include <esp32-hal.h>
28
#include "freertos/FreeRTOS.h"
29
#include "freertos/queue.h"
30
+#include "Stream.h"
31
32
#define I2C_BUFFER_LENGTH 128
33
-class TwoWire
34
+class TwoWire: public Stream
35
{
36
protected:
37
uint8_t num;
@@ -71,6 +72,10 @@ class TwoWire
71
72
int peek(void);
73
void flush(void);
74
75
+ inline size_t write(const char * s)
76
+ {
77
+ return write((uint8_t*) s, strlen(s));
78
+ }
79
inline size_t write(unsigned long n)
80
81
return write((uint8_t)n);
@@ -92,4 +97,3 @@ class TwoWire
92
97
extern TwoWire Wire;
93
98
94
99
#endif
95
-
0 commit comments