Forum Discussion
Altera_Forum
Honored Contributor
12 years agoYes, nios II code. basically I'm making a game that has a 60 second time limit. If the time runs out the red leds on the dev board flash on and off at half second intervals. If the player wins the green leds flash on and off at quarter second intervals. In my main c code I am running a state machine for the game flow. I figured I could just register a different isr for the appropriate states. I won't have a chance to try until later so I figured I'd see if anyone else has tried it before. I'll definitely report back my results once I try it out. Thanks for the response.
--- Quote Start --- Nios II code right? If so, I'm not 100% sure if things are designed to work this way, but it should be easy enough to try, right? You may want to surround the next call to alt_irq_register() with calls to alt_irq_disable() and alt_irq_enable(). I'll look at this further to see if there would be any more concerns about doing this, but these are my initial thoughts. --- Quote End ---