embassy-stm32

Crates

git

Versions

stm32l431rb

Flavors

Skip to main content

Module adc

Module adc 

Source
Expand description

Analog to Digital Converter (ADC)

Modules§

vals
Register-level enums of the ADC, re-exported from the PAC.

Structs§

Adc
Analog to Digital driver.
AnalogWatchdog
A driver for an ADC analog watchdog.
BorrowedAdcChannel
A type-erased borrowed channel for a given ADC instance.
Config
ADC configuration.
ConfiguredSequence
An ADC with a pre-configured channel sequence for repeated DMA reads.
ConfiguredTransfer
An ADC with a pre-configured channel sequence for repeated DMA to peripheral reads.
Dac
DAC output channel, internally connected to the ADC.
InjectedAdc
Injected ADC sequence with owned channels.
InjectedAdcTrigger
External trigger for injected conversions.
InterruptHandler
Interrupt handler.
OverrunError
The DMA ring buffer was not read fast enough and samples were lost.
Oversampling
Raw control of the hardware oversampler.
RegularAdcTrigger
External trigger for regular conversions.
RingBufferedAdc
ADC streaming samples into a circular DMA buffer, created by Adc::into_ring_buffered.
State
Interrupt state shared between the driver and the interrupt handler.
Temperature
Internal temperature sensor channel.
Vbat
Backup battery voltage channel (VBAT divided by 2, 3 or 4 depending on the chip).
VddCore
Core supply voltage channel.
VrefInt
Internal voltage reference channel.

Enums§

Clock
ADC clock selection.
Dual
Exten
External trigger edge selection.
OversamplingRatio
Number of samples the oversampler accumulates.
Prescaler
ADC clock prescaler, applied to the kernel clock in asynchronous clock mode.
Resolution
Conversion resolution.
SampleTime
Sample time, in ADC clock cycles.
SyncDiv
ADC clock divider, applied to the bus clock in synchronous clock mode.
WatchdogChannels
Channel selection passed into Adc::enable_watchdog.
WatchdogIndex
Select which of the hardware analog watchdogs to use.

Constants§

TS_CAL1_TEMP_C
Temperature at which TS_CAL1 was measured (30°C).
TS_CAL2_TEMP_C
Temperature at which TS_CAL2 was measured (130°C).
VREF_CALIB_MV
VREF voltage used for factory calibration of VREFINTCAL register.
VREF_DEFAULT_MV
Default VREF voltage used for sample conversion to millivolts.

Traits§

AdcChannel
ADC channel.
BasicAdcRegs
Register block of an ADC instance: the sample time type of the ADC.
BasicInstance
The register block type of an ADC instance.
BorrowedChannel
Anything that can be turned into a BorrowedAdcChannel: a &mut to a channel, or a borrowed channel itself.
HasInternalChannel
ADC instances that have the internal channel C.
InjectedMode
Interrupt mode of an InjectedAdc.
InjectedTrigger
InjectedTrigger trigger trait
Instance
ADC instance.
RegularTrigger
RegularTrigger trigger trait
RxDma
RxDma DMA request trait
SampleTimes
Sample-time lookup for Adc::sample_time_for_us.

Functions§

resolution_to_max_count
Get the maximum reading value for this resolution.

Type Aliases§

SampleTimeOf
Sample time type of an ADC instance.