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.
1 parent 12aedb1 commit d7b141eCopy full SHA for d7b141e
src/port.rs
@@ -100,16 +100,18 @@ impl SerialPort {
100
}
101
102
/// Sends a byte on the serial port.
103
+ /// 0x08 (backspace) and 0x7F (delete) get replaced with 0x08, 0x20, 0x08 and 0x0A (\n) gets replaced with \r\n.
104
+ /// If this replacement is unwanted use [send_raw] instead.
105
pub fn send(&mut self, data: u8) {
106
match data {
107
8 | 0x7F => {
108
self.send_raw(8);
109
self.send_raw(b' ');
110
111
- 0x0a => {
- self.send_raw(0x0d);
112
- self.send_raw(0x0a);
+ 0x0A => {
113
+ self.send_raw(0x0D);
114
+ self.send_raw(0x0A);
115
116
data => {
117
self.send_raw(data);
0 commit comments