Skip to content

Commit 463bf47

Browse files
committed
Support LPC1114 platform
Added TARGET_LPC1114 pins for InterruptIn test case and changed to PullUp mode.
1 parent 10e30b5 commit 463bf47

File tree

1 file changed

+21
-0
lines changed
  • libraries/tests/mbed/interruptin_2

1 file changed

+21
-0
lines changed

libraries/tests/mbed/interruptin_2/main.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ InterruptIn button8(p10);
1313
InterruptIn button9(p9);
1414
DigitalOut led(LED1);
1515
DigitalOut flash(LED4);
16+
17+
#elif defined(TARGET_LPC1114)
18+
InterruptIn button(p30); // SW2 (User switch)
19+
InterruptIn button1(p5);
20+
InterruptIn button2(p6);
21+
InterruptIn button3(p7);
22+
InterruptIn button4(p9);
23+
InterruptIn button5(p10);
24+
InterruptIn button6(p12);
25+
InterruptIn button7(p13);
26+
InterruptIn button8(p14);
27+
InterruptIn button9(p15);
28+
DigitalOut led(LED1);
29+
DigitalOut flash(LED2);
30+
1631
#else
1732
InterruptIn button(p30);
1833
InterruptIn button1(p29);
@@ -33,6 +48,11 @@ void flip() {
3348
}
3449

3550
int main() {
51+
flash = 0;
52+
led = 0;
53+
#if defined(TARGET_LPC1114)
54+
button.mode(PullUp);
55+
#endif
3656
button.rise(&flip); // attach the address of the flip function to the rising edge
3757
button1.rise(&flip);
3858
button2.rise(&flip);
@@ -43,6 +63,7 @@ int main() {
4363
button7.rise(&flip);
4464
button8.rise(&flip);
4565
button9.rise(&flip);
66+
4667
while(1) { // wait around, interrupts will interrupt this!
4768
flash = !flash;
4869
wait(0.25);

0 commit comments

Comments
 (0)