PER Firmware
Loading...
Searching...
No Matches
adc.c File Reference

Functions

bool PHAL_initADC (ADCInitConfig_t *config, ADCChannelConfig_t channels[], uint8_t num_channels)
 Initializes the ADC, requires GPIO config prior.
 
bool PHAL_startADC (ADCInitConfig_t *config)
 Starts the ADC conversions, requires PHAL_initADC to be called prior.
 
bool PHAL_stopADC (ADCInitConfig_t *config)
 Stops the ADC conversions, requires PHAL_initADC to be called prior.
 
uint16_t PHAL_readADC (ADCInitConfig_t *config)
 Reads the ADC data register.
 

Detailed Description

Author
Eilen Yoon - Port of F4 HAL by Aditya Anand, Chris McGalliard
Version
0.1
Date
2023-09-17

Function Documentation

◆ PHAL_initADC()

bool PHAL_initADC ( ADCInitConfig_t * config,
ADCChannelConfig_t channels[],
uint8_t num_channels )

Initializes the ADC, requires GPIO config prior.

Parameters
adcADC handle
configADC initial config settings
channelsList of channel configurations
num_channelsNumber of channels in the channel configuration list

◆ PHAL_readADC()

uint16_t PHAL_readADC ( ADCInitConfig_t * config)

Reads the ADC data register.

Parameters
adcADC handle
Returns
contents of the data register

◆ PHAL_startADC()

bool PHAL_startADC ( ADCInitConfig_t * config)

Starts the ADC conversions, requires PHAL_initADC to be called prior.

Parameters
adcADC handle

◆ PHAL_stopADC()

bool PHAL_stopADC ( ADCInitConfig_t * config)

Stops the ADC conversions, requires PHAL_initADC to be called prior.

Parameters
adcADC handle