@@ -29,7 +29,7 @@ void ADC_Init(void)
2929{
3030 rcc_peripheral_enable_clock (& RCC_APB2ENR , _RCC_APB2ENR_ADCEN );
3131 /* Make sure the ADC doesn't run during config. */
32- adc_off (_ADC );
32+ adc_power_off (_ADC );
3333 rcc_peripheral_reset (& RCC_APB2RSTR , _RCC_APB2RSTR_ADCRST );
3434 rcc_peripheral_clear_reset (& RCC_APB2RSTR , _RCC_APB2RSTR_ADCRST );
3535 rcc_set_adcpre (RCC_CFGR_ADCPRE_PCLK2_DIV6 );
@@ -41,12 +41,12 @@ void ADC_Init(void)
4141 adc_set_right_aligned (_ADC );
4242
4343 /* We want to read the temperature sensor, so we have to enable it. */
44- adc_enable_temperature_sensor (_ADC );
44+ adc_enable_temperature_sensor ();
4545 adc_set_sample_time_on_all_channels (_ADC , _ADC_SMPR_SMP_XXDOT5CYC );
4646
4747 adc_power_on (_ADC );
4848 adc_reset_calibration (_ADC );
49- adc_calibration (_ADC );
49+ adc_calibrate (_ADC );
5050
5151 //Build a RNG seed using ADC 14, 16, 17
5252 for (int i = 0 ; i < 8 ; i ++ ) {
@@ -58,7 +58,7 @@ void ADC_Init(void)
5858 //This is important. We're using the temp value as a buffer because otherwise the channel data
5959 //Can bleed into the voltage-sense data.
6060 //By disabling the temperature, we always read a consistent value
61- adc_disable_temperature_sensor (_ADC );
61+ adc_disable_temperature_sensor ();
6262 printf ("RNG Seed: %08x\n" , (int )rand32 ());
6363
6464 /* The following is based on code from here: http://code.google.com/p/rayaairbot */
0 commit comments