|
| static ADC_Common_TypeDef * | adc_common_registers (const ADC_TypeDef *instance) |
| | Return the common register bank containing an ADC instance.
|
| |
| static void | adc_enable_clock (const ADC_TypeDef *instance) |
| | Enable and synchronize the peripheral clock for an ADC instance.
|
| |
| static void | adc_configure_clock (const ADC_TypeDef *instance) |
| | Select the synchronous HCLK/4 ADC clock if it is not already configured.
|
| |
| static bool | adc_wait_for_register (const volatile uint32_t *reg, uint32_t mask, bool expected_set) |
| | Wait for masked register bits to reach the requested state.
|
| |
| static void | adc_regulator_delay (void) |
| | Wait at least the ADC regulator startup interval.
|
| |
| static void | adc_set_sequence_slot (ADC_TypeDef *instance, uint8_t rank, uint8_t channel) |
| | Program one channel into a regular conversion sequence rank.
|
| |
| static void | adc_set_sample_time (ADC_TypeDef *instance, uint8_t channel) |
| | Set one channel to the driver's fixed maximum sampling time.
|
| |
| static void | adc_configure_sequence (ADC_TypeDef *instance, const PHAL_ADC_ChannelConfig_t *channels, size_t channel_count) |
| | Program the configured channel order and sampling times.
|
| |
| static void | adc_configure_conversion (ADC_TypeDef *instance) |
| | Apply the driver's fixed resolution, trigger, and DMA conversion settings.
|
| |
| static bool | adc_calibrate (ADC_TypeDef *instance) |
| | Run single-ended ADC calibration and wait for completion.
|
| |
| bool | ADC_PRIV_instance_is_supported (const ADC_TypeDef *instance) |
| | Return whether an ADC instance is supported by this driver.
|
| |
| bool | ADC_PRIV_configure (ADC_TypeDef *instance, const PHAL_ADC_ChannelConfig_t *channels, size_t channel_count) |
| | Configure and calibrate a disabled ADC instance.
|
| |
| bool | ADC_PRIV_enable (ADC_TypeDef *instance) |
| | Enable an ADC instance and wait for it to become ready.
|
| |
| bool | ADC_PRIV_disable (ADC_TypeDef *instance) |
| | Stop and disable an ADC instance.
|
| |
| bool | ADC_PRIV_is_ready (const ADC_TypeDef *instance) |
| | Return whether an ADC instance is enabled and ready.
|
| |
| void | ADC_PRIV_prepare_transfer (ADC_TypeDef *instance, bool continuous) |
| | Clear transfer flags and select single or continuous DMA requests.
|
| |
| void | ADC_PRIV_start_conversion (ADC_TypeDef *instance) |
| | Start the configured regular conversion sequence.
|
| |
| bool | ADC_PRIV_stop_conversion (ADC_TypeDef *instance) |
| | Stop an active regular conversion sequence.
|
| |
Register-level implementation of the STM32G4 ADC PHAL.
All direct ADC register manipulation lives here so the public layer only coordinates the ADC with its DMA channel. Covers clocking, calibration, sequence and sampling-time programming, and bounded busy-wait start/stop helpers.
- Author
- Ronak Jain (jain7.nosp@m.17@p.nosp@m.urdue.nosp@m..edu)