aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2014-01-25 02:31:49 +0100
committerJakob Odersky <jodersky@gmail.com>2014-01-25 02:31:49 +0100
commit9453a44cfc475b57319d1051c74f72753ca4f64c (patch)
tree2c5437e77504232c6f42f1929ff3deb5b5f72eab /main.c
parent06c4f980e915c2ec6c685ca2ba8781b9af547239 (diff)
downloadmux-9453a44cfc475b57319d1051c74f72753ca4f64c.tar.gz
mux-9453a44cfc475b57319d1051c74f72753ca4f64c.tar.bz2
mux-9453a44cfc475b57319d1051c74f72753ca4f64c.zip
implement sleeping
Diffstat (limited to 'main.c')
-rw-r--r--main.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/main.c b/main.c
index 95ee2f2..d1ceaa9 100644
--- a/main.c
+++ b/main.c
@@ -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);
- }
- }
+
}
}