Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| learn:microprocessor:tutorials:pic32-interrupts-appendices:start [2017/12/21 18:39] – created Martha | learn:microprocessor:tutorials:pic32-interrupts-appendices:start [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== Alternate Methods for Declaring Interrupt Service Routines ===== | ===== Alternate Methods for Declaring Interrupt Service Routines ===== | ||
| The following three examples of declaring a function to service a Timer 1 interrupt as an ISR are equivalent. Although method “a” is probably the simplest to write, methods “b” and “c” are provided because they may be used by other sources that the reader may encounter. | The following three examples of declaring a function to service a Timer 1 interrupt as an ISR are equivalent. Although method “a” is probably the simplest to write, methods “b” and “c” are provided because they may be used by other sources that the reader may encounter. | ||
| + | \\ | ||
| + | \\ | ||
| + | < | ||
| + | <a href="/ | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| < | < | ||
| - | <ol> | + | < |
| < | < | ||
| </ol> | </ol> | ||
| </ | </ | ||
| + | |||
| < | < | ||
| void __ISR(_TIMER_1_VECTOR, | void __ISR(_TIMER_1_VECTOR, | ||
| Line 17: | Line 25: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| < | < | ||
| <ol start=" | <ol start=" | ||
| < | < | ||
| </ | </ | ||
| + | |||
| < | < | ||
| void __attribute__( (interrupt(ipl2), | void __attribute__( (interrupt(ipl2), | ||
| Line 30: | Line 40: | ||
| } | } | ||
| </ | </ | ||
| - | <hmtl> | + | |
| + | <html> | ||
| <ol start=" | <ol start=" | ||
| < | < | ||
| </ | </ | ||
| + | |||
| < | < | ||
| #pragma interrupt Timer1Handler ipl2 vector 4 | #pragma interrupt Timer1Handler ipl2 vector 4 | ||

