Skip to content

Commit 994c6c9

Browse files
committed
readme: document that serial should use embedded-io.
1 parent baccfdb commit 994c6c9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

embedded-hal-async/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ This crate contains asynchronous versions of the [`embedded-hal`](https://crates
1010

1111
This project is developed and maintained by the [HAL team](https://github.com/rust-embedded/wg#the-hal-team).
1212

13+
## Serial/UART traits
14+
15+
There is no serial traits in `embedded-hal-async`. Instead, use [`embedded-io-async`](https://crates.io/crates/embedded-io).
16+
A serial port is essentially a byte-oriented stream, and that's what `embedded-io-async` models. Sharing the traits
17+
with all byte streams has some advantages. For example, it allows generic code providing a command-line interface
18+
or a console to operate either on hardware serial ports or on virtual ones like Telnet or USB CDC-ACM.
19+
1320
## Minimum Supported Rust Version (MSRV)
1421

1522
This crate requires Rust nightly newer than `nightly-2022-11-22`, due to requiring support for

embedded-hal/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ embedded-hal keyword](https://doc.rust-lang.org/cargo/reference/manifest.html#pa
7878
to your crate before publishing it!
7979
//
8080

81+
## Serial/UART traits
82+
83+
There is no serial traits in `embedded-hal`. Instead, use [`embedded-io`](https://crates.io/crates/embedded-io).
84+
A serial port is essentially a byte-oriented stream, and that's what `embedded-io` models. Sharing the traits
85+
with all byte streams has some advantages. For example, it allows generic code providing a command-line interface
86+
or a console to operate either on hardware serial ports or on virtual ones like Telnet or USB CDC-ACM.
87+
8188
## Minimum Supported Rust Version (MSRV)
8289

8390
This crate is guaranteed to compile on stable Rust 1.60 and up. It *might*

0 commit comments

Comments
 (0)