(device: SerioDevice, bytes: &mut Str)
| 435 | } |
| 436 | |
| 437 | pub fn serial_write_str(device: SerioDevice, bytes: &mut Str) { |
| 438 | let uart = get_uart_interface(device); |
| 439 | for byte in bytes.into_iter() { |
| 440 | uart.write(&[byte]); |
| 441 | } |
| 442 | |
| 443 | // Fixes memory leak. When calling this function you'll |
| 444 | // usually be operating with an intermediary string and |
| 445 | // won't be able to drop() it yourself. |
| 446 | bytes.drop(); |
| 447 | } |
| 448 | |
| 449 | pub fn serial_baud(device: SerioDevice, rate: u32) { |
| 450 | let uart = get_uart_interface(device); |
nothing calls this directly
no test coverage detected