mbed-os/libraries/tests/mbed/sleep/main.cpp

21 lines
267 B
C++
Raw Normal View History

#include "test_env.h"
2013-05-16 06:53:02 +00:00
#if defined(TARGET_LPC4088)
InterruptIn wkp(P2_10);
#else
InterruptIn wkp(p14);
2013-05-16 06:53:02 +00:00
#endif
void flip() {
printf("button pressed\n");
}
int main() {
wkp.rise(&flip);
while (true) {
// sleep();
deepsleep();
}
}