File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,12 @@ int UART::available() {
315315  return  rxBuffer.available ();
316316}
317317
318+ /*  -------------------------------------------------------------------------- */ 
319+ int  UART::availableForWrite () {
320+ /*  -------------------------------------------------------------------------- */ 
321+   return  txBuffer.availableForStore ();
322+ }
323+ 
318324/*  -------------------------------------------------------------------------- */ 
319325int  UART::peek () {
320326/*  -------------------------------------------------------------------------- */ 
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class UART : public arduino::HardwareSerial {
6565    size_t  write (uint8_t * c, size_t  len);
6666    size_t  write_raw (uint8_t * c, size_t  len);
6767    using  Print::write; 
68+     int  availableForWrite ();
6869    operator  bool (); //  { return true; }
6970
7071  private:           
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments