stm32: adc-v2: pull up temp/vref switches

Common for f0,f3,l0,l4
This commit is contained in:
Karl Palsson
2015-10-24 00:16:35 +00:00
parent 7231b9a691
commit 1d090c840f
6 changed files with 45 additions and 83 deletions

View File

@@ -571,51 +571,6 @@ void adc_disable_dma(uint32_t adc)
ADC_CFGR1(adc) &= ~ADC_CFGR1_DMAEN;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Enable The Temperature Sensor
*
* This enables the sensor on channel 16
*/
void adc_enable_temperature_sensor(void)
{
ADC_CCR |= ADC_CCR_TSEN;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Disable The Temperature Sensor
*
* Disabling this will reduce power consumption from the temperature sensor
* measurement.
*/
void adc_disable_temperature_sensor(void)
{
ADC_CCR &= ~ADC_CCR_TSEN;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Enable The VRef Sensor
*
* This enables the reference voltage measurements on channel 17.
*/
void adc_enable_vref_sensor(void)
{
ADC_CCR |= ADC_CCR_VREFEN;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Disable The VRef Sensor
*
* Disabling this will reduce power consumption from the reference voltage
* measurement.
*/
void adc_disable_vref_sensor(void)
{
ADC_CCR &= ~ADC_CCR_VREFEN;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Enable The VBat Sensor