rust-osdev / uart_16550

Minimal support for uart_16550 serial output.
MIT License
30 stars 23 forks source link

Added send_raw() function to allow sending arbitrary binary data using the serial port. #21

Closed olivercalder closed 2 years ago

olivercalder commented 2 years ago

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 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.

phil-opp commented 2 years ago

Published as v0.2.16