test
Fork of mbed-dev by
Diff: targets/TARGET_STM/TARGET_STM32F4/analogin_api.c
- Revision:
- 168:e84263d55307
- Parent:
- 163:74e0ce7f98e8
- Child:
- 170:e3b6fe271b81
--- a/targets/TARGET_STM/TARGET_STM32F4/analogin_api.c Thu Jun 08 15:02:37 2017 +0100 +++ b/targets/TARGET_STM/TARGET_STM32F4/analogin_api.c Wed Jun 21 17:46:44 2017 +0100 @@ -82,28 +82,28 @@ #if defined(ADC1) if ((obj->adc == ADC_1) && adc1_inited) return; if (obj->adc == ADC_1) { - __ADC1_CLK_ENABLE(); + __HAL_RCC_ADC1_CLK_ENABLE(); adc1_inited = 1; } #endif #if defined(ADC2) if ((obj->adc == ADC_2) && adc2_inited) return; if (obj->adc == ADC_2) { - __ADC2_CLK_ENABLE(); + __HAL_RCC_ADC2_CLK_ENABLE(); adc2_inited = 1; } #endif #if defined(ADC3) if ((obj->adc == ADC_3) && adc3_inited) return; if (obj->adc == ADC_3) { - __ADC3_CLK_ENABLE(); + __HAL_RCC_ADC3_CLK_ENABLE(); adc3_inited = 1; } #endif // Configure ADC AdcHandle.Instance = (ADC_TypeDef *)(obj->adc); - AdcHandle.Init.ClockPrescaler = ADC_CLOCKPRESCALER_PCLK_DIV2; - AdcHandle.Init.Resolution = ADC_RESOLUTION12b; + AdcHandle.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2; + AdcHandle.Init.Resolution = ADC_RESOLUTION_12B; AdcHandle.Init.ScanConvMode = DISABLE; AdcHandle.Init.ContinuousConvMode = DISABLE; AdcHandle.Init.DiscontinuousConvMode = DISABLE;