STM32F7 : internal ADC channels

pull/4878/head
jeromecoutant 2017-08-09 10:21:42 +02:00
parent 803ab189fc
commit 27bf7d21d1
1 changed files with 2 additions and 2 deletions

View File

@ -51,8 +51,8 @@ void analogin_init(analogin_t *obj, PinName pin)
#endif
// 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);