| |||
| Home > Writing Code for ROM > A semihosted application with interrupt handling | |||
This section illustrates an Reference Peripheral
Specification (RPS) based interrupt-driven timer, suitable
for embedded applications. The main() function initializes
and starts two RPS timers.
When a timer expires, an interrupt is generated. The interrupt
is handled in int_handler.c. The code simply
sets a flag and clears the interrupt. The interrupt flags are checked
below in a endless loop. If a flag is set, a message is displayed
and the flag is then cleared.