We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f3a29a7 + 76ca382 commit 42dd310Copy full SHA for 42dd310
cores/arduino/Uart.cpp
@@ -77,6 +77,11 @@ int Uart::available()
77
return rxBuffer.available();
78
}
79
80
+int Uart::availableForWrite()
81
+{
82
+ return (sercom->isDataRegisterEmptyUART() ? 1 : 0);
83
+}
84
+
85
int Uart::peek()
86
{
87
return rxBuffer.peek();
cores/arduino/Uart.h
@@ -32,6 +32,7 @@ class Uart : public HardwareSerial
32
void begin(unsigned long baudrate, uint16_t config);
33
void end();
34
int available();
35
+ int availableForWrite();
36
int peek();
37
int read();
38
void flush();
0 commit comments