pub struct Adc<State> { /* fields omitted */ }
Expand description
Analog to Digital converter interface
Set the Adc sampling time
Set the Adc result alignment
Starts a continuous conversion process
The channel
argument specifies which channel should be converted.
The trigger
argument specifies the trigger that will start each
conversion sequence. This only configures the ADC peripheral to accept
this trigger. The trigger itself must also be configured using its own
peripheral API.
In addition to the preceeding arguments that configure the ADC,
additional arguments are required to configure the DMA transfer that is
used to read the results from the ADC:
dma
is a handle to the DMA peripheral.
dma_chan
is the DMA channel used for the transfer. It needs to be
one of the channels that supports the ADC peripheral.
buffer
is the buffer used to buffer the conversion results.
Panics, if buffer
is larger than 65535.
Returns an iterator over all currently available values
The iterator iterates over all buffered values. It returns None
, once
the end of the buffer has been reached.
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Get the specific ID that identifies this channel, for example 0_u8
for the first ADC
channel, if Self::ID is u8. Read more
Error type returned by ADC methods
Request that the ADC begin a conversion on the specified pin Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.