The send() function has a special case for 0x08 and 0x7F in order to allow terminals to correctly display ASCII backspace and delete characters. However, inserting the additional 0x08 0x20 bytes can mangle binary data being sent using the serial port. Thus, this PR adds a new send_raw() function which allows sending bytes unchanged. By using a new function, this should not break backwards compatibility with previous versions of the crate.
See discussion here: https://github.com/rust-osdev/uart_16550/issues/19
The
send()
function has a special case for 0x08 and 0x7F in order to allow terminals to correctly display ASCII backspace and delete characters. However, inserting the additional 0x08 0x20 bytes can mangle binary data being sent using the serial port. Thus, this PR adds a newsend_raw()
function which allows sending bytes unchanged. By using a new function, this should not break backwards compatibility with previous versions of the crate.