STM32L0 : internal ADC channels

pull/4974/head
jeromecoutant 2017-08-09 10:21:51 +02:00 committed by adbridge
parent 43967d7c75
commit dbee9a2066
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ void analogin_init(analogin_t *obj, PinName pin)
// ADC Internal Channels "pins" (Temperature, Vref, Vbat, ...)
// are described in PinNames.h and PeripheralPins.c
// Pin value must be >= 0xF0
if (pin < 0xF0) {
// Pin value must be between 0xF0 and 0xFF
if ((pin < 0xF0) || (pin >= 0x100)) {
// Normal channels
// Get the peripheral name from the pin and assign it to the object
obj->handle.Instance = (ADC_TypeDef *)pinmap_peripheral(pin, PinMap_ADC);