mirror of https://github.com/ARMmbed/mbed-os.git
STM32F7 : internal ADC channels
parent
803ab189fc
commit
27bf7d21d1
|
@ -51,8 +51,8 @@ void analogin_init(analogin_t *obj, PinName pin)
|
||||||
#endif
|
#endif
|
||||||
// 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->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC);
|
obj->handle.Instance = (ADC_TypeDef *) pinmap_peripheral(pin, PinMap_ADC);
|
||||||
|
|
Loading…
Reference in New Issue