Expand description
Async hardware abstraction layer for embedded devices.
The easiest way to get started is to enable all features.
[dependencies]
async-hal = { version = "...", features = ["full"] }
Or by using cargo add
cargo add async-hal --features full
Feature flags
Async-hal uses a set of feature flags to reduce the amount of compiled code. It
is possible to just enable certain features over others. By default, async-hal
does not enable any features but allows one to enable a subset for their use
case. Below is a list of the available feature flags. You may also notice
above each function, struct and trait there is listed one or more feature flags
that are required for that item to be used. If you are new to async-hal it is
recommended that you use the full feature flag which will enable all public APIs.
Beware though that this will pull in many extra dependencies that you may not
need.
- full: Enables all features listed below except- mock.
- executor: Enables the- async_hal::executormodule.
- nb: Enables async wrappers for non-blocking interfaces (such as from- embedded_hal).
- bxcan: Enables CAN support for stm32 devices with- bxcan.
Re-exports
- pub use executor::Executor;
Modules
- CAN bus
- Delay timers
- Task executor
- Asynchronous IO
- Serial port
Traits
Functions
- Runfutureto completion and return its output. This will repeatedly poll the future and callwait().