??? 12/13/10 15:35 Read: times |
#180132 - Endless loops Responding to: ???'s previous message |
Stefan is guiding you in the right direction, but I would also like to add a comment.
The only endless loop must be in main() Main() should be coded so that it periodically checks the mode, and main should then take the appropriate action for that mode. If the function that implements the actions for a mode will execute for a long time (which includes forever), then the mode function must periodically check whether it should terminate. Your interrupt handler should be setting flags for the main() function and mode() functions to check. |
Topic | Author | Date |
Using Interrupts to call functions | 01/01/70 00:00 | |
what is Your target? | 01/01/70 00:00 | |
Responding to: Stefan Kanev's previous message | 01/01/70 00:00 | |
big task | 01/01/70 00:00 | |
The next question | 01/01/70 00:00 | |
flags, semaphors and so on | 01/01/70 00:00 | |
Endless loops | 01/01/70 00:00 | |
main | 01/01/70 00:00 |