stm32: adc-v2: set _only_ the ADC calibration bit

In adc_calibrate_async() we should only set the ADCAL bit and leave the rest alone.

While in the past there were only "rs" bits in this register, this is no
longer the case.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
This commit is contained in:
M J Oldfield 2019-04-27 22:21:56 +01:00 committed by Karl Palsson
parent f5d2d8f109
commit fc8a6aa7a2
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ void adc_power_off(uint32_t adc)
*/
void adc_calibrate_async(uint32_t adc)
{
ADC_CR(adc) = ADC_CR_ADCAL;
ADC_CR(adc) |= ADC_CR_ADCAL;
}
/**