|
15 | 15 | //! . Please ensure you are reading the correct [documentation] for your target |
16 | 16 | //! device. |
17 | 17 | //! |
18 | | -//! ## Choosing a Device |
19 | | -//! |
20 | | -//! Depending on your target device, you need to enable the chip feature |
21 | | -//! for that device. You may also need to do this on ancillary esp-hal crates. |
22 | | -//! |
23 | 18 | //! ## Overview |
24 | 19 | //! |
| 20 | +//! esp-hal is a Hardware Abstraction Layer (HAL) for Espressif's ESP32 lineup of |
| 21 | +//! microcontrollers offering safe, idiotmatic APIs to control hardware peripherals. |
| 22 | +//! |
25 | 23 | //! ### Peripheral drivers |
26 | 24 | //! |
27 | | -//! The HAL implements both blocking _and_ async APIs for many peripherals. |
| 25 | +//! The HAL implements both [`Blocking`] _and_ [`Async`] APIs for all applicable peripherals. |
28 | 26 | //! Where applicable, driver implement the [embedded-hal] and |
29 | | -//! [embedded-hal-async] traits. |
| 27 | +//! [embedded-hal-async] traits. Drivers that don't currently have a stable API |
| 28 | +//! are marked as `unstable` in the documentation. |
30 | 29 | //! |
31 | 30 | //! ### Peripheral singletons |
32 | 31 | //! |
|
89 | 88 | //! |
90 | 89 | //! ## Creating a Project |
91 | 90 | //! |
92 | | -//! We have a [book] that explains the full esp-rs ecosystem |
| 91 | +//! We have a [book] that explains the full esp-hal ecosystem |
93 | 92 | //! and how to get started, it's advisable to give that a read |
94 | 93 | //! before proceeding. We also have a [training] that covers some common |
95 | 94 | //! scenarios with examples. |
|
154 | 153 | #![doc = ""] |
155 | 154 | //! ## Don't use `core::mem::forget` |
156 | 155 | //! |
157 | | -//! You should never use `core::mem::forget` on any type defined in the HAL. |
158 | | -//! Some types heavily rely on their `Drop` implementation to not leave the |
159 | | -//! hardware in undefined state and causing UB. |
| 156 | +//! You should never use `core::mem::forget` on any type defined in [esp crates]. |
| 157 | +//! Many types heavily rely on their `Drop` implementation to not leave the |
| 158 | +//! hardware in undefined state which can cause undefined behaviour in your program. |
160 | 159 | //! |
161 | 160 | //! You might want to consider using [`#[deny(clippy::mem_forget)`](https://rust-lang.github.io/rust-clippy/v0.0.212/index.html#mem_forget) in your project. |
162 | 161 | //! |
|
185 | 184 | //! [esp-generate]: https://github.com/esp-rs/esp-generate |
186 | 185 | //! [book]: https://docs.espressif.com/projects/rust/book/ |
187 | 186 | //! [training]: https://docs.espressif.com/projects/rust/no_std-training/ |
| 187 | +//! [esp crates]: https://docs.espressif.com/projects/rust/book/introduction/ancillary-crates.html#esp-hal-ecosystem |
188 | 188 | //! |
189 | 189 | //! ## Feature Flags |
190 | 190 | #![doc = document_features::document_features!(feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"#)] |
|
0 commit comments