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

Function usb_serial_write

src/usb_serial.rs:212–220  ·  view source on GitHub ↗

Write an array of bytes to the USB host. ```no_run use teensycore::usb_serial::*; usb_serial_write(b"Hello, world!"); ```

(bytes: &[u8])

Source from the content-addressed store, hash-verified

210/// usb_serial_write(b"Hello, world!");
211/// ```
212pub fn usb_serial_write(bytes: &[u8]) {
213 unsafe {
214 for byte in bytes {
215 TX_BUFFER_TRANSIENT.push(*byte);
216 }
217 }
218
219 usb_timer_oneshot();
220}
221
222/// This method will flush the current queue of data to
223/// the usb host. It is invoked automatically based

Callers 2

usb_serial_putcharFunction · 0.85
printFunction · 0.85

Calls 2

usb_timer_oneshotFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected