Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: targets/TARGET_STM/TARGET_STM32F2/analogin_api.c
- Revision:
- 150:02e0a0aed4ec
- Parent:
- 149:156823d33999
diff -r 156823d33999 -r 02e0a0aed4ec targets/TARGET_STM/TARGET_STM32F2/analogin_api.c --- a/targets/TARGET_STM/TARGET_STM32F2/analogin_api.c Fri Oct 28 11:17:30 2016 +0100 +++ b/targets/TARGET_STM/TARGET_STM32F2/analogin_api.c Tue Nov 08 17:45:16 2016 +0000 @@ -58,8 +58,9 @@ MBED_ASSERT(function != (uint32_t)NC); obj->channel = STM_PIN_CHANNEL(function); - // Configure GPIO excepted for internal channels (Temperature, Vref, Vbat) - if ((obj->channel != 16) && (obj->channel != 17) && (obj->channel != 18)) { + // Configure GPIO excepted for internal channels (Temperature, Vref, Vbat, ...) + // ADC Internal Channels "pins" are described in PinNames.h and must have a value >= 0xF0 + if (pin < 0xF0) { pinmap_pinout(pin, PinMap_ADC); }