Skip to content

Commit 53a52a1

Browse files
authored
Merge pull request #2930 from bcostm/adcintch_F0
STM32F0xx - Use ADC internal channels specific definitions
2 parents ad59be6 + 480d784 commit 53a52a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

targets/TARGET_STM/TARGET_STM32F0/analogin_api.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ static inline uint16_t adc_read(analogin_t *obj) {
153153
sConfig.Channel = ADC_CHANNEL_15;
154154
break;
155155
case 16:
156-
sConfig.Channel = ADC_CHANNEL_16;
156+
sConfig.Channel = ADC_CHANNEL_TEMPSENSOR;
157157
break;
158158
case 17:
159-
sConfig.Channel = ADC_CHANNEL_17;
159+
sConfig.Channel = ADC_CHANNEL_VREFINT;
160160
break;
161-
#ifdef ADC_CHANNEL_18
161+
#ifdef ADC_CHANNEL_VBAT
162162
case 18:
163-
sConfig.Channel = ADC_CHANNEL_18;
163+
sConfig.Channel = ADC_CHANNEL_VBAT;
164164
break;
165165
#endif
166166
default:

0 commit comments

Comments
 (0)