File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ class SerialUSB_ : public ZephyrSerial {
18
18
void begin(unsigned long baudrate) { begin(baudrate, SERIAL_8N1); }
19
19
20
20
operator bool() override;
21
+ size_t write(const uint8_t *buffer, size_t size) override;
22
+ void flush() override;
21
23
22
24
protected:
23
25
uint32_t dtr = 0;
Original file line number Diff line number Diff line change @@ -124,5 +124,16 @@ arduino::SerialUSB_::operator bool() {
124
124
return dtr;
125
125
}
126
126
127
+
128
+ size_t arduino::SerialUSB_::write(const uint8_t *buffer, size_t size) {
129
+ if (!Serial) return 0;
130
+ return arduino::ZephyrSerial::write(buffer, size);
131
+ }
132
+
133
+ void arduino::SerialUSB_::flush() {
134
+ if (!Serial) return;
135
+ arduino::ZephyrSerial::flush();
136
+ }
137
+
127
138
arduino::SerialUSB_ Serial(usb_dev);
128
139
#endif
You can’t perform that action at this time.
0 commit comments