если вектор например вот:
void USB_c_irq_handler( void )
{
бла-бла
}
то устанавливается он так
AT91F_AIC_Init( AT91C_BASE_AIC, AT91C_ID_UDP, usbINTERRUPT_PRIORITY, AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE, USB_c_irq_handler );
где
unsigned int AT91F_AIC_Init
(
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) (void)// \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
pAic->AIC_SVR[ irq_id ] = (unsigned int) newHandler;
//* 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 );
}