File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
hal/targets/hal/TARGET_STM/TARGET_STM32F3 Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
/* mbed Microcontroller Library
2
- * Copyright (c) 2015 , STMicroelectronics
2
+ * Copyright (c) 2016 , STMicroelectronics
3
3
* All rights reserved.
4
4
*
5
5
* Redistribution and use in source and binary forms, with or without
@@ -62,8 +62,10 @@ void analogin_init(analogin_t *obj, PinName pin)
62
62
MBED_ASSERT (function != (uint32_t )NC );
63
63
obj -> channel = STM_PIN_CHANNEL (function );
64
64
65
- // Configure GPIO
66
- pinmap_pinout (pin , PinMap_ADC );
65
+ // Configure GPIO excepted for internal channels (Temperature, Vref, Vbat)
66
+ if ((obj -> channel != 16 ) && (obj -> channel != 17 ) && (obj -> channel != 18 )) {
67
+ pinmap_pinout (pin , PinMap_ADC );
68
+ }
67
69
68
70
// Save pin number for the read function
69
71
obj -> pin = pin ;
You can’t perform that action at this time.
0 commit comments