]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/tests/mbed/interruptin_2/main.cpp
3 #if defined(TARGET_LPC4088)
4 InterruptIn
button(p18
);
5 InterruptIn
button1(p17
);
6 InterruptIn
button2(p16
);
7 InterruptIn
button3(p15
);
8 InterruptIn
button4(p14
);
9 InterruptIn
button5(p13
);
10 InterruptIn
button6(p12
);
11 InterruptIn
button7(p11
);
12 InterruptIn
button8(p10
);
13 InterruptIn
button9(p9
);
15 DigitalOut
flash(LED4
);
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
);
29 DigitalOut
flash(LED2
);
32 InterruptIn
button(p30
);
33 InterruptIn
button1(p29
);
34 InterruptIn
button2(p28
);
35 InterruptIn
button3(p27
);
36 InterruptIn
button4(p26
);
37 InterruptIn
button5(p25
);
38 InterruptIn
button6(p24
);
39 InterruptIn
button7(p23
);
40 InterruptIn
button8(p22
);
41 InterruptIn
button9(p21
);
43 DigitalOut
flash(LED4
);
53 #if defined(TARGET_LPC1114)
56 button
.rise(&flip
); // attach the address of the flip function to the rising edge
67 while(1) { // wait around, interrupts will interrupt this!