pub fn write_data( port: &mut dyn SerialPort, data: &[u8], ) -> Result<usize, String>
Write data to the serial port