STM32: ADC: Fix PinMap_ADC_Internal

The instance needs to be searched in PinMap_ADC_Internal, not PinMap_ADC.
This was a copy paste error...
pull/4623/head
Laurent MEUNIER 2017-07-20 14:15:37 +02:00
parent b9d801fe72
commit 7414b1266b
4 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ void analogin_init(analogin_t *obj, PinName pin)
pinmap_pinout(pin, PinMap_ADC);
} else {
// Internal channels
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC);
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC_Internal);
function = pinmap_function(pin, PinMap_ADC_Internal);
// No GPIO configuration for internal channels
}

View File

@ -62,7 +62,7 @@ void analogin_init(analogin_t *obj, PinName pin)
pinmap_pinout(pin, PinMap_ADC);
} else {
// Internal channels
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC);
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC_Internal);
function = pinmap_function(pin, PinMap_ADC_Internal);
// No GPIO configuration for internal channels
}

View File

@ -61,7 +61,7 @@ void analogin_init(analogin_t *obj, PinName pin)
pinmap_pinout(pin, PinMap_ADC);
} else {
// Internal channels
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC);
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC_Internal);
function = pinmap_function(pin, PinMap_ADC_Internal);
// No GPIO configuration for internal channels
}

View File

@ -55,7 +55,7 @@ void analogin_init(analogin_t *obj, PinName pin)
pinmap_pinout(pin, PinMap_ADC);
} else {
// Internal channels
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC);
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC_Internal);
function = pinmap_function(pin, PinMap_ADC_Internal);
// No GPIO configuration for internal channels
}