ADC Basic configuration API.
More...
ADC Basic configuration API.
◆ adc_calibrate_start()
void adc_calibrate_start |
( |
uint32_t |
adc | ) |
|
◆ adc_calibrate_wait_finish()
void adc_calibrate_wait_finish |
( |
uint32_t |
adc | ) |
|
ADC Wait to finish the ADC calibration procedure.
- Deprecated:
- Replaced by adc_calibrate/_async/is_calibrating
- Parameters
-
Definition at line 422 of file adc.c.
References ADC_CR, and ADC_CR_ADCAL.
◆ adc_disable_vbat_sensor()
void adc_disable_vbat_sensor |
( |
void |
| ) |
|
ADC Disable The VBat Sensor.
Disabling this will reduce power consumption from the battery voltage measurement.
Definition at line 398 of file adc.c.
References ADC1, and ADC_CCR.
◆ adc_enable_vbat_sensor()
void adc_enable_vbat_sensor |
( |
void |
| ) |
|
ADC Enable The VBat Sensor.
This enables the battery voltage measurements on channel 17.
Definition at line 386 of file adc.c.
References ADC1, ADC_CCR, and ADC_CCR_VBATEN.
◆ adc_set_clk_source()
void adc_set_clk_source |
( |
uint32_t |
adc, |
|
|
uint32_t |
source |
|
) |
| |
ADC Set Clock Source.
The ADC clock taken from the many sources.
- Parameters
-
Definition at line 309 of file adc.c.
References ADC_CFGR2.
◆ adc_set_regular_sequence()
void adc_set_regular_sequence |
( |
uint32_t |
adc, |
|
|
uint8_t |
length, |
|
|
uint8_t |
channel[] |
|
) |
| |
ADC Set a Regular Channel Conversion Sequence.
Define a sequence of channels to be converted as a regular group with a length from 1 to 18 channels. If this is called during conversion, the current conversion is reset and conversion begins again with the newly defined group.
- Warning
- This core doesn't support the random order of ADC conversions. The channel list must be ordered by channel number.
- Parameters
-
[in] | adc | Unsigned int32. ADC base address (ADC register base addresses) |
[in] | length | Unsigned int8. Number of channels in the group. |
[in] | channel | Unsigned int8[]. Set of channels to convert, integers 0..18. |
Definition at line 331 of file adc.c.
References ADC_CFGR1, ADC_CFGR1_SCANDIR, ADC_CHSELR, and cm3_assert_not_reached.
◆ adc_set_sample_time_on_all_channels()
void adc_set_sample_time_on_all_channels |
( |
uint32_t |
adc, |
|
|
uint8_t |
time |
|
) |
| |
ADC Set the Sample Time for All Channels.
The sampling time can be selected in ADC clock cycles from 1.5 to 239.5, same for all channels.
- Parameters
-
Definition at line 375 of file adc.c.
References ADC_SMPR, and ADC_SMPR_SMP.