Skip to content

Commit 866858a

Browse files
committed
Fixed LPC1114 ADC offset problem
1 parent f4bfe5a commit 866858a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX/PeripheralNames.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ typedef enum {
3737
ADC0_3,
3838
ADC0_4,
3939
ADC0_5,
40-
ADC0_6
40+
ADC0_6,
41+
ADC0_7
4142
} ADCName;
4243

4344
typedef enum {

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX/analogin_api.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ static const PinMap PinMap_ADC[] = {
3232
{P1_0 , ADC0_1, 2},
3333
{P1_1 , ADC0_2, 2},
3434
{P1_2 , ADC0_3, 2},
35-
{P1_4 , ADC0_4, 1},
36-
{P1_10, ADC0_5, 1},
37-
{P1_11, ADC0_6, 1},
35+
// ADC0_4 (P1_3) should be mapped to SWDIO only
36+
{P1_4 , ADC0_5, 1},
37+
{P1_10, ADC0_6, 1},
38+
{P1_11, ADC0_7, 1},
3839
{NC , NC , 0}
3940
};
4041

0 commit comments

Comments
 (0)