helpfor studient
Dependents: STM32_F103-C8T6basecanblink_led
Fork of mbed-dev by
Diff: targets/TARGET_WIZNET/TARGET_W7500x/analogin_api.c
- Revision:
- 165:e614a9f1c9e2
- Parent:
- 160:d5399cc887bb
--- a/targets/TARGET_WIZNET/TARGET_W7500x/analogin_api.c Wed May 10 12:06:41 2017 +0100 +++ b/targets/TARGET_WIZNET/TARGET_W7500x/analogin_api.c Fri May 26 12:39:01 2017 +0100 @@ -42,8 +42,6 @@ ADC_TypeDef * AdcHandle; -static int adc_inited = 0; - void analogin_init(analogin_t *obj, PinName pin) { // Get the peripheral name from the pin and assign it to the object @@ -57,12 +55,8 @@ // Save pin number for the read function obj->pin = pin; - // The ADC initialization is done once - if (adc_inited == 0) { - adc_inited = 1; - - ADC_Init(); - } + // The ADC initialization + ADC_Init(); } static inline uint16_t adc_read(analogin_t *obj)