We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
send_raw
1 parent 378d468 commit b3f7fe9Copy full SHA for b3f7fe9
src/mmio.rs
@@ -95,6 +95,15 @@ impl MmioSerialPort {
95
}
96
97
98
+ /// Sends a raw byte on the serial port, intended for binary data.
99
+ pub fn send_raw(&mut self, data: u8) {
100
+ let self_data = self.data.load(Ordering::Relaxed);
101
+ wait_for!(self.line_sts().contains(LineStsFlags::OUTPUT_EMPTY));
102
+ unsafe {
103
+ self_data.write(data);
104
+ }
105
106
+
107
/// Receives a byte on the serial port.
108
pub fn receive(&mut self) -> u8 {
109
let self_data = self.data.load(Ordering::Relaxed);
0 commit comments