stm32: adc-v2: extract common calibration code
Extract the calibration code from the f0, and share it with the other adc-v2 peripheral users (f0,l0,f3,l4) Uses the same naming set of is/async naming conventions requested by the RTOS guys instead of having blocking only calls. Old code: adc_calibrate_start(ADC); adc_calibrate_wait_finish(ADC); New code (blocking): adc_calibrate(ADC); New code (asynch): adc_calibrate_async(ADC); // do stuff adc_is_calibrating(ADC); // will be false when it's finished. Old code for f0 is still available, but marked deprecated.
This commit is contained in:
@@ -398,6 +398,7 @@ void adc_disable_vbat_sensor(void)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @brief ADC Start the calibration procedure
|
||||
* @deprecated Replaced by adc_calibrate/_async/is_calibrating
|
||||
*
|
||||
* @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base)
|
||||
*/
|
||||
@@ -409,6 +410,7 @@ void adc_calibrate_start(uint32_t adc)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @brief ADC Wait to finish the ADC calibration procedure
|
||||
* @deprecated Replaced by adc_calibrate/_async/is_calibrating
|
||||
*
|
||||
* @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user