pub struct RegistryEntry(*mut saul_reg);
riot_module_saul
only.Expand description
A discovered SAUL registry entry
Tuple Fields§
§0: *mut saul_reg
Implementations§
source§impl RegistryEntry
impl RegistryEntry
sourcepub fn nth(pos: usize) -> Option<Self>
pub fn nth(pos: usize) -> Option<Self>
Find a registry entry by its index
Wrapper around saul_reg_find_nth
.
sourcepub fn all() -> AllRegistryEntries
pub fn all() -> AllRegistryEntries
All registered entries.
Do not expect more from its return type than being impl Iterator<Item = Self>
; this will
change back to that once type_alias_impl_trait
is stable.
pub fn type_(&self) -> Option<Class>
pub fn name(&self) -> Option<&'static str>
sourcepub fn read(&self) -> Result<Phydat, NumericError>
pub fn read(&self) -> Result<Phydat, NumericError>
Read a value from the SAUL device
sourcepub fn write(&self, value: Phydat) -> Result<(), NumericError>
pub fn write(&self, value: Phydat) -> Result<(), NumericError>
Write a value to the SAUL device
Note that the saul_reg_write call does not really pass on the initialized length of the values to the device, but the device returns the used length. If the lengths do not match, the returned length is expressed as an error.
Auto Trait Implementations§
impl Freeze for RegistryEntry
impl RefUnwindSafe for RegistryEntry
impl !Send for RegistryEntry
impl !Sync for RegistryEntry
impl Unpin for RegistryEntry
impl UnwindSafe for RegistryEntry
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes