diff options
author | Jakob Odersky <jodersky@gmail.com> | 2014-01-25 02:31:49 +0100 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2014-01-25 02:31:49 +0100 |
commit | 9453a44cfc475b57319d1051c74f72753ca4f64c (patch) | |
tree | 2c5437e77504232c6f42f1929ff3deb5b5f72eab /main.c | |
parent | 06c4f980e915c2ec6c685ca2ba8781b9af547239 (diff) | |
download | mux-9453a44cfc475b57319d1051c74f72753ca4f64c.tar.gz mux-9453a44cfc475b57319d1051c74f72753ca4f64c.tar.bz2 mux-9453a44cfc475b57319d1051c74f72753ca4f64c.zip |
implement sleeping
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 23 |
1 files changed, 4 insertions, 19 deletions
@@ -34,31 +34,16 @@ void wake() { void blink( char id) { while(1) { debug_led(id,1); - //yield(); - WAIT_CYCLES(5000); + sleep(500); debug_led(id,0); - //yield(); - WAIT_CYCLES(5000); - freeze(); + sleep(500); } } void read(char id) { + sleep(5000); while(1) { - debug_led(0, 0); - debug_led(3, 0); - unsigned char buttons = tshield_read(); - if (buttons != 0) { - wake(); - debug_led(0, 1); - unsigned int counter = 0; - if (counter > 0) { - debug_led(3, 1); - } - if (list_empty(&frozen)) { - debug_led(3, 1); - } - } + } } |