control flow question

14 Oct 2012

I come to a place in my program where I'd like to just hold while waiting for an interrupt. I realize that I could do this with a while loop or even a goto - based loop but am wondering if there is a more sophisticated way to do this. Ideas guys??

14 Oct 2012

It's next on my list to investigate, but you could also look at the sleep modes to save on power.

14 Oct 2012

was just about to poke into those Kev when I stumbled on this: wait(0) when used in the following context it worked for me...

while (flag == 0){
    wait(0);
}

not pretty (wasting cycles and whatnot) but its just a simple project so no multi-tasking... program dutifully holds right there waiting for the interrupt driven flag to flip