| |||||
Technical Support Support Resources
Product Information | ARMCC: INTERRUPT DEFINITION WITH ATMEL LIBRARYInformation in this article applies to:
QUESTIONI am using the Atmel library and I have defined a simple interrupt function with:
__irq void isr_function(void) {
:
}
I now enable the interrupt function with: AT91F_AIC_ConfigureIt (pAIC,AT91C_ID_PIOA,AT91C_AIC_PRIOR_HIGHEST,AT91C_AIC_SRCTYPE_HIGH_LEVEL, isr_function); But I am getting the following compiler error: error: #167: argument of type "void (*)(void)__irq" is incompatible with parameter of type "void (*)()" What can be the reason? ANSWERThe RealView compiler does very strict type-checking and you need therefore to insert a type cast: AT91F_AIC_ConfigureIt (pAIC,AT91C_ID_PIOA,AT91C_AIC_PRIOR_HIGHEST,AT91C_AIC_SRCTYPE_HIGH_LEVEL, (void (*)()) isr_function); Last Reviewed: Friday, February 02, 2007 | ||||
| |||||