veecle_osal_embassy/
lib.rs

1//! Embassy operating system abstraction layer.
2//!
3//! This OSAL requires binaries to depend on the [`embassy-time`](https://docs.rs/embassy-time/latest/embassy_time/)
4//! crate with one of the `generic-queue-*` features enabled.
5//! See <https://docs.rs/embassy-time/latest/embassy_time/#generic-queue> for more information.
6
7#![forbid(unsafe_code)]
8#![cfg_attr(not(test), no_std)]
9#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
10
11#[cfg(not(target_os = "none"))]
12extern crate std;
13
14pub mod log;
15pub mod net;
16pub mod thread;
17pub mod time;
18
19pub use veecle_osal_api::{Error, Result};
20
21/// Helper trait to convert errors into osal errors.
22///
23/// We cannot implement `From` as that would be part of the public API.
24pub(crate) trait IntoOsalError<E>
25where
26    E: core::error::Error,
27{
28    /// Converts the error into an OSAL error.
29    fn into_osal_error(self) -> E;
30}