pub trait ConsoleExt { // Required methods fn read(&self, buf: &mut [u8]) -> Result<usize>; fn read_timeout(&self, buf: &mut [u8], timeout: Duration) -> Result<usize>; }
Extension trait to [Uart] where useful methods are provided.
Uart
Reads UART receive data into buf, returning the number of bytes read. This function is blocking.
buf
Reads UART receive data into buf, returning the number of bytes read. The timeout may be used to specify a duration to wait for data. If timeout expires without any data arriving Ok(0) will be returned, never Err(_).
timeout
Ok(0)
Err(_)