#28891 - ayqazi - Mon Nov 08, 2004 3:43 pm
Hi,
Just browsing the GCC info file looking at extensions and stuff, and here's what I came across:
`interrupt'
Use this attribute on the ARM, AVR, C4x, M32R/D and Xstormy16
ports to indicate that the specified function is an interrupt
handler. The compiler will generate function entry and exit
sequences suitable for use in an interrupt handler when this
attribute is present.
Note, interrupt handlers for the m68k, H8/300, H8/300H, H8S, and
SH processors can be specified via the `interrupt_handler'
attribute.
Note, on the AVR, interrupts will be enabled inside the function.
Note, for the ARM, you can specify the kind of interrupt to be
handled by adding an optional parameter to the interrupt attribute
like this:
void f () __attribute__ ((interrupt ("IRQ")));
Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT
and UNDEF.
Does anybody know if this works? You'll excuse me if I am talking gibberish, its been a while since I tried GBA coding. From what I remember (from doing the famous gba coding tutorials) writing interrupt functions required different techniques than this.
Thanks,
Asfand Yar
_________________
--
http://www.it-is-truth.org/
Just browsing the GCC info file looking at extensions and stuff, and here's what I came across:
`interrupt'
Use this attribute on the ARM, AVR, C4x, M32R/D and Xstormy16
ports to indicate that the specified function is an interrupt
handler. The compiler will generate function entry and exit
sequences suitable for use in an interrupt handler when this
attribute is present.
Note, interrupt handlers for the m68k, H8/300, H8/300H, H8S, and
SH processors can be specified via the `interrupt_handler'
attribute.
Note, on the AVR, interrupts will be enabled inside the function.
Note, for the ARM, you can specify the kind of interrupt to be
handled by adding an optional parameter to the interrupt attribute
like this:
void f () __attribute__ ((interrupt ("IRQ")));
Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT
and UNDEF.
Does anybody know if this works? You'll excuse me if I am talking gibberish, its been a while since I tried GBA coding. From what I remember (from doing the famous gba coding tutorials) writing interrupt functions required different techniques than this.
Thanks,
Asfand Yar
_________________
--
http://www.it-is-truth.org/