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_STM32L4/analogin_api.c
- Revision:
- 170:19eb464bc2be
- Parent:
- 163:74e0ce7f98e8
- Child:
- 171:89b338f31ef1
--- a/targets/TARGET_STM/TARGET_STM32L4/analogin_api.c Wed Jul 19 17:31:21 2017 +0100
+++ b/targets/TARGET_STM/TARGET_STM32L4/analogin_api.c Thu Aug 03 13:13:39 2017 +0100
@@ -47,8 +47,8 @@
// 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->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
