File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,12 @@ int UART::available() {
315
315
return rxBuffer.available ();
316
316
}
317
317
318
+ /* -------------------------------------------------------------------------- */
319
+ int UART::availableForWrite () {
320
+ /* -------------------------------------------------------------------------- */
321
+ return txBuffer.availableForStore ();
322
+ }
323
+
318
324
/* -------------------------------------------------------------------------- */
319
325
int UART::peek () {
320
326
/* -------------------------------------------------------------------------- */
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class UART : public arduino::HardwareSerial {
65
65
size_t write (uint8_t * c, size_t len);
66
66
size_t write_raw (uint8_t * c, size_t len);
67
67
using Print::write;
68
+ int availableForWrite ();
68
69
operator bool (); // { return true; }
69
70
70
71
private:
You can’t perform that action at this time.
0 commit comments