diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-01-02 20:13:35 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-01-02 20:13:35 +0100 |
| commit | 8fa3294f35accd1559d5d704d8add8a29e529826 (patch) | |
| tree | b13359ea9c28ab7307459ade0b8f22cd18203501 | |
| parent | 0ab88ea27974af5987cbe6efcf9d1849900b2bd7 (diff) | |
Update readme
| -rw-r--r-- | README.md | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -11,15 +11,17 @@ Embassy is a project to make async/await a first-class option for embedded devel | |||
| 11 | - `embassy::time`: `Clock` and `Alarm` traits. Std-like `Duration` and `Instant`. | 11 | - `embassy::time`: `Clock` and `Alarm` traits. Std-like `Duration` and `Instant`. |
| 12 | - More traits for SPI, I2C, UART async HAL coming soon. | 12 | - More traits for SPI, I2C, UART async HAL coming soon. |
| 13 | 13 | ||
| 14 | ## Executor with timers | 14 | ## Executor |
| 15 | 15 | ||
| 16 | The `embassy::executor` module provides an async/await executor based on [static-executor](https://github.com/Dirbaio/static-executor). | 16 | The `embassy::executor` module provides an async/await executor designed for embedded usage. |
| 17 | 17 | ||
| 18 | - No `alloc`, no heap needed. Task futures are statically allocated. | 18 | - No `alloc`, no heap needed. Task futures are statically allocated. |
| 19 | - Integrated timer queue allows simple sleeping: `Timer::after(Duration::from_ticks(64000)).await;`. | 19 | - No "fixed capacity" data structures, executor works with 1 or 1000 tasks without needing config/tuning. |
| 20 | - Suitable for low-power operation. Using interrupts or `WFE/SEV` ensures the CPU sleeps when there's no work to do. No busy-loop polling. | 20 | - Integrated timer queue: sleeping is easy, just do `Timer::after(Duration::from_secs(1)).await;`. |
| 21 | - No busy-loop polling: CPU sleeps when there's no work to do, using interrupts or `WFE/SEV`. | ||
| 22 | - Efficient polling: a wake will only poll the woken task, not all of them. | ||
| 23 | - Fair: a task can't monopolize CPU time even if it's constantly being woken. All other tasks get a chance to run before a given task gets polled for the second time. | ||
| 21 | - Creating multiple executor instances is supported, to run tasks with multiple priority levels. This allows higher-priority tasks to preempt lower-priority tasks. | 24 | - Creating multiple executor instances is supported, to run tasks with multiple priority levels. This allows higher-priority tasks to preempt lower-priority tasks. |
| 22 | - Compatible with RTIC (example coming soon). | ||
| 23 | 25 | ||
| 24 | ## Utils | 26 | ## Utils |
| 25 | 27 | ||
| @@ -54,9 +56,7 @@ cargo run --bin rtc_async | |||
| 54 | 56 | ||
| 55 | ## Minimum supported Rust version (MSRV) | 57 | ## Minimum supported Rust version (MSRV) |
| 56 | 58 | ||
| 57 | `rustc 1.48.0-nightly (1fd5b9d51 2020-09-20)` | 59 | Only recent nighly supported. Nightly is required for: |
| 58 | |||
| 59 | Any recent nightly should work. Nightly is required for: | ||
| 60 | 60 | ||
| 61 | - `generic_associated_types`: for trait funcs returning futures. | 61 | - `generic_associated_types`: for trait funcs returning futures. |
| 62 | - `type_alias_impl_trait`: for trait funcs returning futures implemented with `async{}` blocks, and for `static-executor`. | 62 | - `type_alias_impl_trait`: for trait funcs returning futures implemented with `async{}` blocks, and for `static-executor`. |
