stm32: adc: standardize adc_power_off naming. [BREAKING]
Instead of a mismatch of adc_power_on/adc_off, we now have a matched pair of adc_power_{on,off} For some people, this is a breaking change in the API!
This commit is contained in:
parent
c759ba59d0
commit
50c056f965
|
@ -357,7 +357,7 @@ specific memorymap.h header before including this header file.*/
|
|||
BEGIN_DECLS
|
||||
|
||||
void adc_power_on(uint32_t adc);
|
||||
void adc_off(uint32_t adc);
|
||||
void adc_power_off(uint32_t adc);
|
||||
void adc_enable_analog_watchdog_regular(uint32_t adc);
|
||||
void adc_disable_analog_watchdog_regular(uint32_t adc);
|
||||
void adc_enable_analog_watchdog_injected(uint32_t adc);
|
||||
|
|
|
@ -870,7 +870,7 @@
|
|||
BEGIN_DECLS
|
||||
|
||||
void adc_power_on(uint32_t adc);
|
||||
void adc_off(uint32_t adc);
|
||||
void adc_power_off(uint32_t adc);
|
||||
void adc_enable_analog_watchdog_regular(uint32_t adc);
|
||||
void adc_disable_analog_watchdog_regular(uint32_t adc);
|
||||
void adc_enable_analog_watchdog_injected(uint32_t adc);
|
||||
|
|
|
@ -53,7 +53,7 @@ and ADC, reset ADC and set the prescaler divider. Set dual mode to independent
|
|||
|
||||
@code
|
||||
rcc_periph_clock_enable(RCC_ADC1);
|
||||
adc_off(ADC1);
|
||||
adc_power_off(ADC1);
|
||||
rcc_periph_reset_pulse(RST_ADC1);
|
||||
rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV2);
|
||||
adc_set_dual_mode(ADC_CR1_DUALMOD_IND);
|
||||
|
@ -104,7 +104,7 @@ Turn off the ADC to reduce power consumption to a few microamps.
|
|||
adc_reg_base.
|
||||
*/
|
||||
|
||||
void adc_off(uint32_t adc)
|
||||
void adc_power_off(uint32_t adc)
|
||||
{
|
||||
ADC_CR2(adc) &= ~ADC_CR2_ADON;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ and ADC, reset ADC and set the prescaler divider. Set dual mode to independent
|
|||
|
||||
@code
|
||||
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_ADC1EN);
|
||||
adc_off(ADC1);
|
||||
adc_power_off(ADC1);
|
||||
rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_ADC1RST);
|
||||
rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_ADC1RST);
|
||||
rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV2);
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
* adc_reg_base
|
||||
*/
|
||||
|
||||
void adc_off(uint32_t adc)
|
||||
void adc_power_off(uint32_t adc)
|
||||
{
|
||||
ADC_CR(adc) &= ~ADC_CR_ADEN;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue