MCPcopy Create free account
hub / github.com/SharpCoder/teensycore / serial_write_str

Function serial_write_str

src/serio.rs:437–447  ·  view source on GitHub ↗
(device: SerioDevice, bytes: &mut Str)

Source from the content-addressed store, hash-verified

435}
436
437pub 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
449pub fn serial_baud(device: SerioDevice, rate: u32) {
450 let uart = get_uart_interface(device);

Callers

nothing calls this directly

Calls 4

get_uart_interfaceFunction · 0.85
dropMethod · 0.80
into_iterMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected