Цитата(aaarrr @ Apr 22 2011, 11:28)

Как минимум
Код
__irq void Usart0IrqHandler(void)
а не
Код
unsigned int Usart0IrqHandler(void)
AT91F_AIC_ConfigureIt (AT91C_BASE_AIC,AT91C_ID_US0, 1, AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, Usart0IrqHandler);
Параметры вызова этой функции таковы
Код
__inline unsigned int AT91F_AIC_ConfigureIt (
AT91PS_AIC pAic, // \arg pointer to the AIC registers
unsigned int irq_id, // \arg interrupt number to initialize
unsigned int priority, // \arg priority to give to the interrupt
unsigned int src_type, // \arg activation and sense of activation
void (*newHandler) () ) // \arg address of the interrupt handler
{
unsigned int oldHandler;
unsigned int mask;
oldHandler = pAic->AIC_SVR[irq_id];
mask = 0x1 << irq_id;
//* Disable the interrupt on the interrupt controller
pAic->AIC_IDCR = mask;
//* Save the interrupt handler routine pointer and the interrupt priority
[b] pAic->AIC_SVR[irq_id] = (unsigned int) newHandler;[/b]
//* Store the Source Mode Register
pAic->AIC_SMR[irq_id] = src_type | priority ;
//* Clear the interrupt on the interrupt controller
pAic->AIC_ICCR = mask;
return oldHandler;
}
таким образом вылетает ошибка
Serial.c(89): error: #167: argument of type "void (*)(void)__irq" is incompatible with parameter of type "void (*)()"