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.
- Analog
Watchdog - A driver for an ADC analog watchdog.
- Borrowed
AdcChannel - A type-erased borrowed channel for a given ADC instance.
- Config
- ADC configuration.
- Configured
Sequence - An ADC with a pre-configured channel sequence for repeated DMA reads.
- Configured
Transfer - An ADC with a pre-configured channel sequence for repeated DMA to peripheral reads.
- Dac
- DAC output channel, internally connected to the ADC.
- Injected
Adc - Injected ADC sequence with owned channels.
- Injected
AdcTrigger - External trigger for injected conversions.
- Interrupt
Handler - Interrupt handler.
- Overrun
Error - The DMA ring buffer was not read fast enough and samples were lost.
- Oversampling
- Raw control of the hardware oversampler.
- Regular
AdcTrigger - External trigger for regular conversions.
- Ring
Buffered Adc - 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.
- Oversampling
Ratio - Number of samples the oversampler accumulates.
- Prescaler
- ADC clock prescaler, applied to the kernel clock in asynchronous clock mode.
- Resolution
- Conversion resolution.
- Sample
Time - Sample time, in ADC clock cycles.
- SyncDiv
- ADC clock divider, applied to the bus clock in synchronous clock mode.
- Watchdog
Channels - Channel selection passed into
Adc::enable_watchdog. - Watchdog
Index - 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.
- Basic
AdcRegs - Register block of an ADC instance: the sample time type of the ADC.
- Basic
Instance - The register block type of an ADC instance.
- Borrowed
Channel - Anything that can be turned into a
BorrowedAdcChannel: a&mutto a channel, or a borrowed channel itself. - HasInternal
Channel - ADC instances that have the internal channel
C. - Injected
Mode - Interrupt mode of an
InjectedAdc. - Injected
Trigger - InjectedTrigger trigger trait
- Instance
- ADC instance.
- Regular
Trigger - RegularTrigger trigger trait
- RxDma
- RxDma DMA request trait
- Sample
Times - Sample-time lookup for
Adc::sample_time_for_us.
Functions§
- resolution_
to_ max_ count - Get the maximum reading value for this resolution.
Type Aliases§
- Sample
Time Of - Sample time type of an ADC instance.