mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
172:7d866c31b3c5
Parent:
171:89b338f31ef1
Child:
173:e131a1973e81
--- a/targets/TARGET_STM/TARGET_STM32F4/analogin_api.c	Wed Aug 16 18:27:13 2017 +0100
+++ b/targets/TARGET_STM/TARGET_STM32F4/analogin_api.c	Thu Aug 31 17:27:04 2017 +0100
@@ -51,8 +51,8 @@
 #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);