Trait IntoPeripheral
pub trait IntoPeripheral<'a, P>: Sealed {
// Required method
fn into_hal_peripheral(self) -> Self;
}Expand description
This is an adapter trait necessary for compatibility with the underlying HALs.
The underlying HALs manage peripherals differently: for instance, the drivers from
Embassy HALs require a Peri instance constrained on the required peripheral ZST, while
drivers from esp-hal require the peripheral ZST directly.
In practice, this trait allows passing the peripheral ZSTs obtained through Ariel OS
facilities directly to Ariel OS drivers that have a trait
bound on IntoPeripheral.
Note: It is never necessary to implement this trait outside of Ariel OS, and the trait is therefore sealed.
Required Methods§
fn into_hal_peripheral(self) -> Self
fn into_hal_peripheral(self) -> Self
Converts this peripheral instance into the type required by the HAL.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.