pub struct Adc<State> {
pub onchip_channels: OnChipChannels,
// some fields omitted
}
Expand description
Interface for ADC Peripheral.
Returned by calling HALExt::split on the pac ADC structure. Holds state
of peripheral.
Contains the On-Chip ADC Channels, like the MCU’s temperature sensor.
Poll to determine if ADC conversion is complete.
Note: This flag is cleared when the sampling mode is changed,
interrupts are enabled, Adc::set_channel is called, and when Adc::result is
called (including Adc::try_result)
Poll to determine if ADC conversion is underway
Grab the last ADC conversion result.
Poll for conversion completion, if done return the result.
Set ADC target channel.
In Single conversion mode (OneShot), setting the channel begins the conversion. In FIFO mode
the channel is added to the FIFO buffer.
Note: If the channel is changed while a conversion is in progress the
current conversion will be cancelled. If in FIFO mode, conversion will
resume once the FIFO channels are refilled.
Set the ADC’s configuration
Connects the bus clock to the adc via the SIM peripheral, allowing
read and write access to ADC registers.
Any attempt to access ADC registers while disabled results in a
HardFault, generated by hardware.
This also enables the bandgap voltage reference.
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
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.