Table of Contents Previous topic Next topic
Code Creation Wizards->Interrupt and I/O Handlers
If a peripheral supports interrupts and if the text cursor is in a normal C source file (not xstdsys.c) when it's wizard is opened, the Insert at End of File option will be available. If you select this option, an interrupt handler function will appear in the list view above it. If you click on Insert, this interrupt handler function will be added to the end of the file in which the cursor is located. You can then add your specific handler code to this function.
Note that the interrupt handler code generated can vary depending on the interrupt options you have selected for the peripheral. For instance FIQ and IRQ interrupts handlers are different and nestable and non-nestable IRQ interrupts handlers are also different. You will therefore need to recreate the interrupt handler if you later change the interrupt attributes of a peripheral.
In some cases, the wizards can create additional code too. For instance the UART wizards can create the getch() and putch() functions that are required by the C stream functions such as printf() and scanf(). These will also be show in the same view as the interrupt function and will be inserted at the end of the source file.