diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-01-11 21:23:07 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-01-11 21:23:07 +0100 |
| commit | e18d6737212fe9a2a606cef210c64bf45ecc925c (patch) | |
| tree | b883d932d82cc89a02ef5f7de6fc520521090676 | |
| parent | 0d62e9c96ca14d9d9596f72d090e41855050e83c (diff) | |
More readme fixes.
| -rw-r--r-- | embassy-nrf/README.md | 16 | ||||
| -rw-r--r-- | embassy-rp/README.md | 24 | ||||
| -rw-r--r-- | embassy-stm32/README.md | 19 |
3 files changed, 50 insertions, 9 deletions
diff --git a/embassy-nrf/README.md b/embassy-nrf/README.md index 1ead96b2c..50662749d 100644 --- a/embassy-nrf/README.md +++ b/embassy-nrf/README.md | |||
| @@ -4,7 +4,7 @@ HALs implement safe, idiomatic Rust APIs to use the hardware capabilities, so ra | |||
| 4 | 4 | ||
| 5 | The Embassy nRF HAL targets the Nordic Semiconductor nRF family of hardware. The HAL implements both blocking and async APIs | 5 | The Embassy nRF HAL targets the Nordic Semiconductor nRF family of hardware. The HAL implements both blocking and async APIs |
| 6 | for many peripherals. The benefit of using the async APIs is that the HAL takes care of waiting for peripherals to | 6 | for many peripherals. The benefit of using the async APIs is that the HAL takes care of waiting for peripherals to |
| 7 | complete operations in low power mod and handling interrupts, so that applications can focus on more important matters. | 7 | complete operations in low power mode and handling interrupts, so that applications can focus on more important matters. |
| 8 | 8 | ||
| 9 | NOTE: The Embassy HALs can be used both for non-async and async operations. For async, you can choose which runtime you want to use. | 9 | NOTE: The Embassy HALs can be used both for non-async and async operations. For async, you can choose which runtime you want to use. |
| 10 | 10 | ||
| @@ -18,16 +18,26 @@ The `embassy-nrf` HAL supports most variants of the nRF family: | |||
| 18 | * nRF53 ([examples](https://github.com/embassy-rs/embassy/tree/main/examples/nrf5340)) | 18 | * nRF53 ([examples](https://github.com/embassy-rs/embassy/tree/main/examples/nrf5340)) |
| 19 | * nRF91 ([examples](https://github.com/embassy-rs/embassy/tree/main/examples/nrf9160)) | 19 | * nRF91 ([examples](https://github.com/embassy-rs/embassy/tree/main/examples/nrf9160)) |
| 20 | 20 | ||
| 21 | Most peripherals are supported. | 21 | Most peripherals are supported. To check what's available, make sure to pick the MCU you're targeting in the top menu in the [documentation](https://docs.embassy.dev/embassy-nrf). |
| 22 | |||
| 23 | For MCUs with TrustZone support, both Secure (S) and Non-Secure (NS) modes are supported. Running in Secure mode | ||
| 24 | allows running Rust code without a SPM or TF-M binary, saving flash space and simplifying development. | ||
| 22 | 25 | ||
| 23 | ## Time driver | 26 | ## Time driver |
| 24 | 27 | ||
| 25 | If the `time` feature is enabled, the HAL uses the RTC peripheral as a global time driver for [embassy-time](https://crates.io/crates/embassy-time), with a tick rate of 32768 Hz. | 28 | If the `time-driver-rtc1` feature is enabled, the HAL uses the RTC peripheral as a global time driver for [embassy-time](https://crates.io/crates/embassy-time), with a tick rate of 32768 Hz. |
| 26 | 29 | ||
| 27 | ## Embedded-hal | 30 | ## Embedded-hal |
| 28 | 31 | ||
| 29 | The `embassy-nrf` HAL implements the traits from [embedded-hal](https://crates.io/crates/embedded-hal) (v0.2 and 1.0) and [embedded-hal-async](https://crates.io/crates/embedded-hal-async), as well as [embedded-io](https://crates.io/crates/embedded-io) and [embedded-io-async](https://crates.io/crates/embedded-io-async). | 32 | The `embassy-nrf` HAL implements the traits from [embedded-hal](https://crates.io/crates/embedded-hal) (v0.2 and 1.0) and [embedded-hal-async](https://crates.io/crates/embedded-hal-async), as well as [embedded-io](https://crates.io/crates/embedded-io) and [embedded-io-async](https://crates.io/crates/embedded-io-async). |
| 30 | 33 | ||
| 34 | ## Interoperability | ||
| 35 | |||
| 36 | This crate can run on any executor. | ||
| 37 | |||
| 38 | Optionally, some features requiring [`embassy-time`](https://crates.io/crates/embassy-time) can be activated with the `time` feature. If you enable it, | ||
| 39 | you must link an `embassy-time` driver in your project. | ||
| 40 | |||
| 31 | ## EasyDMA considerations | 41 | ## EasyDMA considerations |
| 32 | 42 | ||
| 33 | On nRF chips, peripherals can use the so called EasyDMA feature to offload the task of interacting | 43 | On nRF chips, peripherals can use the so called EasyDMA feature to offload the task of interacting |
diff --git a/embassy-rp/README.md b/embassy-rp/README.md index 1d14eca52..8cf7da994 100644 --- a/embassy-rp/README.md +++ b/embassy-rp/README.md | |||
| @@ -2,8 +2,26 @@ | |||
| 2 | 2 | ||
| 3 | HALs implement safe, idiomatic Rust APIs to use the hardware capabilities, so raw register manipulation is not needed. | 3 | HALs implement safe, idiomatic Rust APIs to use the hardware capabilities, so raw register manipulation is not needed. |
| 4 | 4 | ||
| 5 | The Embassy RP HAL targets the Raspberry Pi 2040 family of hardware. The HAL implements both blocking and async APIs | 5 | The embassy-rp HAL targets the Raspberry Pi RP2040 microcontroller. The HAL implements both blocking and async APIs |
| 6 | for many peripherals. The benefit of using the async APIs is that the HAL takes care of waiting for peripherals to | 6 | for many peripherals. The benefit of using the async APIs is that the HAL takes care of waiting for peripherals to |
| 7 | complete operations in low power mod and handling interrupts, so that applications can focus on more important matters. | 7 | complete operations in low power mode and handling interrupts, so that applications can focus on more important matters. |
| 8 | 8 | ||
| 9 | NOTE: The Embassy HALs can be used both for non-async and async operations. For async, you can choose which runtime you want to use. | 9 | * [embassy-rp on crates.io](https://crates.io/crates/embassy-rp) |
| 10 | * [Documentation](https://docs.embassy.dev/embassy-rp/) | ||
| 11 | * [Source](https://github.com/embassy-rs/embassy/tree/main/embassy-rp) | ||
| 12 | * [Examples](https://github.com/embassy-rs/embassy/tree/main/examples/rp/src/bin) | ||
| 13 | |||
| 14 | ## `embassy-time` time driver | ||
| 15 | |||
| 16 | If the `time-driver` feature is enabled, the HAL uses the TIMER peripheral as a global time driver for [embassy-time](https://crates.io/crates/embassy-time), with a tick rate of 1MHz. | ||
| 17 | |||
| 18 | ## Embedded-hal | ||
| 19 | |||
| 20 | The `embassy-rp` HAL implements the traits from [embedded-hal](https://crates.io/crates/embedded-hal) (v0.2 and 1.0) and [embedded-hal-async](https://crates.io/crates/embedded-hal-async), as well as [embedded-io](https://crates.io/crates/embedded-io) and [embedded-io-async](https://crates.io/crates/embedded-io-async). | ||
| 21 | |||
| 22 | ## Interoperability | ||
| 23 | |||
| 24 | This crate can run on any executor. | ||
| 25 | |||
| 26 | Optionally, some features requiring [`embassy-time`](https://crates.io/crates/embassy-time) can be activated with the `time` feature. If you enable it, | ||
| 27 | you must link an `embassy-time` driver in your project. | ||
diff --git a/embassy-stm32/README.md b/embassy-stm32/README.md index 23c1bf967..e9ae455a4 100644 --- a/embassy-stm32/README.md +++ b/embassy-stm32/README.md | |||
| @@ -19,7 +19,20 @@ In practice, this works as follows: | |||
| 19 | 19 | ||
| 20 | Be aware that, while embassy-stm32 strives to consistently support all peripherals across all chips, this approach can lead to slightly different APIs and capabilities being available on different families. Check the [documentation](https://docs.embassy.dev/embassy-stm32/) for the specific chip you’re using to confirm exactly what’s available. | 20 | Be aware that, while embassy-stm32 strives to consistently support all peripherals across all chips, this approach can lead to slightly different APIs and capabilities being available on different families. Check the [documentation](https://docs.embassy.dev/embassy-stm32/) for the specific chip you’re using to confirm exactly what’s available. |
| 21 | 21 | ||
| 22 | ## embassy-time Time Driver | 22 | ## Embedded-hal |
| 23 | If the `time` feature is enabled, embassy-stm32 provides a time driver for use with [embassy-time](https://docs.embassy.dev/embassy-time/). You can pick which hardware timer is used for this internally via the `time-driver-*` features, or let embassy pick with `time-driver-any`. | ||
| 24 | 23 | ||
| 25 | embassy-time has a default tick rate of 1MHz, which is fast enough to cause problems with the 16-bit timers currently supported by the embassy-stm32 time driver (specifically, if a critical section delays an IRQ by more than 32ms). To avoid this, it’s recommended to pick a lower tick rate. 32.768kHz is a reasonable default for many purposes. \ No newline at end of file | 24 | The `embassy-stm32` HAL implements the traits from [embedded-hal](https://crates.io/crates/embedded-hal) (v0.2 and 1.0) and [embedded-hal-async](https://crates.io/crates/embedded-hal-async), as well as [embedded-io](https://crates.io/crates/embedded-io) and [embedded-io-async](https://crates.io/crates/embedded-io-async). |
| 25 | |||
| 26 | ## `embassy-time` time driver | ||
| 27 | If a `time-driver-*` feature is enabled, embassy-stm32 provides a time driver for use with [embassy-time](https://docs.embassy.dev/embassy-time/). You can pick which hardware timer is used for this internally via the `time-driver-tim*` features, or let embassy pick with `time-driver-any`. | ||
| 28 | |||
| 29 | embassy-time has a default tick rate of 1MHz, which is fast enough to cause problems with the 16-bit timers currently supported by the embassy-stm32 time driver (specifically, if a critical section delays an IRQ by more than 32ms). To avoid this, it’s recommended to pick a lower tick rate. 32.768kHz is a reasonable default for many purposes. | ||
| 30 | |||
| 31 | ## Interoperability | ||
| 32 | |||
| 33 | This crate can run on any executor. | ||
| 34 | |||
| 35 | Optionally, some features requiring [`embassy-time`](https://crates.io/crates/embassy-time) can be activated with the `time` feature. If you enable it, | ||
| 36 | you must link an `embassy-time` driver in your project. | ||
| 37 | |||
| 38 | The `low-power` feature integrates specifically with `embassy-executor`, it can't be ued on other executors for now. | ||
