17.3.2 Interrupt-Pragma Vector Clause
The interrupt pragma has an optional vector
clause following the
priority specifier.
# pragma interrupt function-nameIPL-specifier
[vector [@]vector-number [, vector-number-list]]
A dispatch function targeting the specified handler function will be created at the exception vector address for the specified vector numbers. If the first vector number is specified with a preceding “@” symbol, the handler function itself will be located there directly.
For example, the following pragma specifies that function foo
will be
created as an interrupt handler function of priority four. foo
will be
located at the address of exception vector 54. A dispatch function targeting
foo
will be created at exception vector address 34.
#pragma interrupt foo IPL4AUTO vector @54, 34
The following pragma specifies that function bar
will be created as an
interrupt handler function of priority five. bar
will be located in
general purpose program memory (.text section). A dispatch function targeting
bar
will be created at exception vector address 23.
#pragma interrupt bar IPL5SOFT vector 23