pub struct ADC { /* private fields */ }
Expand description

Analog to Digital converter interface

Implementations

Initialize the ADC

Enable and get the Vref

Enable and get the Temperature

Enable and get the Vbat

Calculates the system VDDA by sampling the internal VREF channel and comparing the result with the value stored at the factory. If the chip’s VDDA is not stable, run this before each ADC conversion.

Set the ADC resolution

Set the sample time

Get the max value for the current resolution

Release the ADC peripheral

Drops ADC and returns the (pac::ADC, pad::ADC_COMMON) that is was wrapping, giving the user full access to the peripheral.

Convert a measurement to millivolts

Convert a raw sample from the Temperature to deg C

Configure the channel for a specific step in the sequence.

Automatically sets the sequence length to the farthes sequence index that has been used so far. Use ADC::reset_sequence to reset the sequence length.

Reset the sequence length to 1

Does not erase previously configured sequence settings, only changes the sequence length

Trait Implementations

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Channel ID type 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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.