Struct riot_wrappers::adc::ADCLine
source · pub struct ADCLine(/* private fields */);
Available on
riot_module_periph_adc
only.Implementations§
source§impl ADCLine
impl ADCLine
sourcepub unsafe fn init(line: adc_t) -> Result<Self, i32>
pub unsafe fn init(line: adc_t) -> Result<Self, i32>
Initialize an ADC line and get it as a handle. This is declared as unsafe as it may only be called once. (A safe abstraction would need to check which RIOT devices have been initialized already).
This being unsafe is inconsistent with other subsystem wrappers that chose to not declare this unsafe; that inconsistency is tracked in https://github.com/RIOT-OS/rust-riot-wrappers/issues/59 and so far unresolved.
sourcepub unsafe fn from_number(line: u32) -> Result<Self, i32>
pub unsafe fn from_number(line: u32) -> Result<Self, i32>
Initialize an ADC line identified by the line number it is assigned on the board
Safety: See [init]
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ADCLine
impl Send for ADCLine
impl Sync for ADCLine
impl Unpin for ADCLine
impl UnwindSafe for ADCLine
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
Mutably borrows from an owned value. Read more