File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 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)
214214return  (unsigned  int )(CDC_SERIAL_BUFFER_SIZE + buffer->head  - buffer->tail ) % CDC_SERIAL_BUFFER_SIZE;
215215}
216216
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+ 
217224int  Serial_::peek (void )
218225{
219226ring_buffer *buffer = &cdc_rx_buffer;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class Serial_ : public Stream
5454void  end (void );
5555
5656virtual  int  available (void );
57+ virtual  int  availableForWrite (void );
5758virtual  void  accept (void );
5859virtual  int  peek (void );
5960virtual  int  read (void );
                                 You can’t perform that action at this time. 
               
                  
0 commit comments