b9e0ea0 Merge commit '7fa9d8bdea3773d1195b04d98fcf27cf48ddd81d' as 'tool/mbed/mbed-sdk' 7fa9d8b Squashed 'tool/mbed/mbed-sdk/' content from commit 7c21ce5 git-subtree-dir: tmk_core git-subtree-split: b9e0ea08cb940de20b3610ecdda18e9d8cd7c552
28 lines
424 B
C++
28 lines
424 B
C++
#include "test_env.h"
|
|
|
|
#if defined(TARGET_LPC4088)
|
|
InterruptIn wkp(P2_10);
|
|
#elif defined(TARGET_K22F)
|
|
InterruptIn wkp(D0);
|
|
#elif defined(TARGET_LPC11U68)
|
|
InterruptIn wkp(P0_16);
|
|
#else
|
|
InterruptIn wkp(p14);
|
|
#endif
|
|
|
|
void flip() {
|
|
printf("button pressed\n");
|
|
}
|
|
|
|
int main() {
|
|
#if defined(TARGET_LPC11U68)
|
|
wkp.mode(PullUp);
|
|
#endif
|
|
wkp.rise(&flip);
|
|
|
|
while (true) {
|
|
// sleep();
|
|
deepsleep();
|
|
}
|
|
}
|