Function robust_arduino_serial::read_i8
[−]
[src]
pub fn read_i8<T: Read>(file: &mut T) -> Result<i8, Error>
Read one byte from a file/serial port and convert it to a 8 bits int
Example
use std::io::Cursor; let mut buffer = Cursor::new(vec![2]); let num: i8 = robust_arduino_serial::read_i8(&mut buffer).unwrap(); assert_eq!(2, num);