Tedd OKANO
/
_sample_self_reset
Revision 0:57ee3dae2e7f, committed 2011-03-30
- Comitter:
- okano
- Date:
- Wed Mar 30 03:56:47 2011 +0000
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Mar 30 03:56:47 2011 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + +BusOut led( LED1, LED2, LED3, LED4 ); +DigitalInOut io( p5 ); + +int main() { + io.mode( PullUp ); + io.input(); + io = 0; + char count = 4; + + led = 0xF; wait( 0.25 ); led = 0x0; wait( 0.25 ); + led = 0xF; wait( 0.25 ); led = 0x0; wait( 0.25 ); + + while (1) { + led = 0xF0 >> count; + if ( !count-- ) + io.output(); + wait( 1 ); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Mar 30 03:56:47 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912