deepsleep() program for mbed LPC11U24 beta
Revision 0:1e4c251b7f9d, committed 2011-10-20
- Comitter:
- chris
- Date:
- Thu Oct 20 11:46:18 2011 +0000
- Child:
- 1:5ef4805c9afd
- Commit message:
Changed in this revision
2011_10_19.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/2011_10_19.lib Thu Oct 20 11:46:18 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/projects/mbed-libraries/svn/branches/emilmont/2011_10_19@161 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 20 11:46:18 2011 +0000 @@ -0,0 +1,23 @@ +#include "mbed.h" + +BusOut leds(LED1,LED2,LED3,LED4); + +InterruptIn wakeup(p14); + +void dostuff() { + for (int i=0; i<5; i++) { + leds = 1 << i; + wait(0.25); + } +} + +int main () { + + wakeup.rise(NULL); + + while (1) { + dostuff(); + deepsleep(); + } + +}