mirror of https://github.com/ARMmbed/mbed-os.git
STM32L4 AnalogIn init issue with _ALT pins
parent
8e989b072d
commit
70c5407697
|
@ -47,8 +47,8 @@ void analogin_init(analogin_t *obj, PinName pin)
|
||||||
|
|
||||||
// ADC Internal Channels "pins" (Temperature, Vref, Vbat, ...)
|
// ADC Internal Channels "pins" (Temperature, Vref, Vbat, ...)
|
||||||
// are described in PinNames.h and PeripheralPins.c
|
// are described in PinNames.h and PeripheralPins.c
|
||||||
// Pin value must be >= 0xF0
|
// Pin value must be between 0xF0 and 0xFF
|
||||||
if (pin < 0xF0) {
|
if ((pin < 0xF0) || (pin >= 0x100)) {
|
||||||
// Normal channels
|
// Normal channels
|
||||||
// Get the peripheral name from the pin and assign it to the object
|
// Get the peripheral name from the pin and assign it to the object
|
||||||
obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
|
obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
|
||||||
|
|
Loading…
Reference in New Issue