File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -109,19 +109,20 @@ uintptr_t mp_hal_stdio_poll(uintptr_t poll_flags) {
109109    uintptr_t  ret  =  0 ;
110110    #if  MICROPY_HW_ESP_USB_SERIAL_JTAG 
111111    usb_serial_jtag_poll_rx ();
112-     if  ((poll_flags  &  MP_STREAM_POLL_RD ) &&  ringbuf_peek (& stdin_ringbuf ) !=  -1 ) {
113-         ret  |= MP_STREAM_POLL_RD ;
114-     }
115-     if  (poll_flags  &  MP_STREAM_POLL_WR ) {
116-         ret  |= MP_STREAM_POLL_WR ;
117-     }
118112    #endif 
119113    #if  MICROPY_HW_USB_CDC 
120114    ret  |= mp_usbd_cdc_poll_interfaces (poll_flags );
121115    #endif 
122116    #if  MICROPY_PY_OS_DUPTERM 
123117    ret  |= mp_os_dupterm_poll (poll_flags );
124118    #endif 
119+     // Check ringbuffer directly for uart and usj. 
120+     if  ((poll_flags  &  MP_STREAM_POLL_RD ) &&  ringbuf_peek (& stdin_ringbuf ) !=  -1 ) {
121+         ret  |= MP_STREAM_POLL_RD ;
122+     }
123+     if  (poll_flags  &  MP_STREAM_POLL_WR ) {
124+         ret  |= MP_STREAM_POLL_WR ;
125+     }
125126    return  ret ;
126127}
127128
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments