PER Firmware
Loading...
Searching...
No Matches
adc_priv.h File Reference

Private register-level API for the STM32G4 ADC PHAL. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "common/phal_G4/adc/adc.h"
Include dependency graph for adc_priv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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.
 

Detailed Description

Private register-level API for the STM32G4 ADC PHAL.

Used by adc.c to drive the ADC directly: clock setup, calibration, sequence and sample-time programming, enable/disable, and conversion start/stop. Not for direct use by application code.

Author
Ronak Jain (jain7.nosp@m.17@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ ADC_PRIV_configure()

bool ADC_PRIV_configure ( ADC_TypeDef * instance,
const PHAL_ADC_ChannelConfig_t * channels,
size_t channel_count )

Configure and calibrate a disabled ADC instance.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADC_PRIV_disable()

bool ADC_PRIV_disable ( ADC_TypeDef * instance)

Stop and disable an ADC instance.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADC_PRIV_enable()

bool ADC_PRIV_enable ( ADC_TypeDef * instance)

Enable an ADC instance and wait for it to become ready.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADC_PRIV_instance_is_supported()

bool ADC_PRIV_instance_is_supported ( const ADC_TypeDef * instance)

Return whether an ADC instance is supported by this driver.

Here is the caller graph for this function:

◆ ADC_PRIV_is_ready()

bool ADC_PRIV_is_ready ( const ADC_TypeDef * instance)

Return whether an ADC instance is enabled and ready.

◆ ADC_PRIV_prepare_transfer()

void ADC_PRIV_prepare_transfer ( ADC_TypeDef * instance,
bool continuous )

Clear transfer flags and select single or continuous DMA requests.

Here is the caller graph for this function:

◆ ADC_PRIV_start_conversion()

void ADC_PRIV_start_conversion ( ADC_TypeDef * instance)

Start the configured regular conversion sequence.

Here is the caller graph for this function:

◆ ADC_PRIV_stop_conversion()

bool ADC_PRIV_stop_conversion ( ADC_TypeDef * instance)

Stop an active regular conversion sequence.

Here is the call graph for this function:
Here is the caller graph for this function: