#ifndef __armvic_h__
#define __armvic_h__

#include "armirq.h"    /* ARM arch-specific IRQ handling defines */
#include "irqvec.h"    /* for LPC2106-specific irq vector numbers */
#include "config.h"

#define VICIrqDone      do { VICVectAddr = 0; } while (0)

#ifdef CONFIG_TOOLCHAIN_IAR
typedef __irq __arm void armNonNestedIsr_t(void);
typedef __irq __nested __arm void armNestedIsr_t(void);
#endif

#ifdef CONFIG_TOOLCHAIN_ROWLEY
typedef void armNonNestedIsr_t(void);
typedef void armNestedIsr_t(void);
#endif

#ifdef __cplusplus
extern "C" {
#endif

int armvicInit(void);
int armvicInit2(void);

int armvicIntConnect(int vecSlot, int vecNum, armNestedIsr_t isr)
int armvicIntDisconnect(int vecSlot);

int armvicSoftIntAssert(int vecNum);
int armvicSoftIntNegate(int vecNum);
int armvicSoftIntNegateAll(void);

int armvicIntEnable(int vecNum);
int armvicIntDisable(int vecNum);

#ifdef __cplusplus
}
#endif

#endif /* __armvic_h__ */
