File tree 2 files changed +8
-0
lines changed
hardware/arduino/sam/cores/arduino/USB
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,13 @@ int Serial_::available(void)
214
214
return (unsigned int )(CDC_SERIAL_BUFFER_SIZE + buffer->head - buffer->tail ) % CDC_SERIAL_BUFFER_SIZE;
215
215
}
216
216
217
+ int Serial_::availableForWrite (void )
218
+ {
219
+ // return the number of bytes left in the current bank,
220
+ // always EP size - 1, because bank is flushed on every write
221
+ return (EPX_SIZE - 1 );
222
+ }
223
+
217
224
int Serial_::peek (void )
218
225
{
219
226
ring_buffer *buffer = &cdc_rx_buffer;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class Serial_ : public Stream
54
54
void end (void );
55
55
56
56
virtual int available (void );
57
+ virtual int availableForWrite (void );
57
58
virtual void accept (void );
58
59
virtual int peek (void );
59
60
virtual int read (void );
You can’t perform that action at this time.
0 commit comments