Skip to main content

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
10#[cfg(not(target_os = "none"))]
11extern crate std;
12
13pub mod log;
14pub mod net;
15pub mod time;
16
17pub use veecle_osal_api::{Error, Result};
18
19/// Helper trait to convert errors into osal errors.
20///
21/// We cannot implement `From` as that would be part of the public API.
22pub(crate) trait IntoOsalError<E>
23where
24    E: core::error::Error,
25{
26    /// Converts the error into an OSAL error.
27    fn into_osal_error(self) -> E;
28}