Make irq init function a weak function

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3031 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-10-17 17:41:28 +00:00
parent d872538195
commit 89916e830f
2 changed files with 7 additions and 2 deletions

View File

@ -277,7 +277,7 @@ EXTERN bool at91uc3_gpioread(uint16_t pinset);
****************************************************************************/
#ifdef CONFIG_AVR32_GPIOIRQ
EXTERN void gpio_irqinitialize(void);
EXTERN void weak_function gpio_irqinitialize(void);
#endif
/****************************************************************************

View File

@ -230,7 +230,12 @@ void up_irqinitialize(void)
/* Initialize GPIO interrupt facilities */
#ifdef CONFIG_AVR32_GPIOIRQ
gpio_irqinitialize();
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (gpio_irqinitialize != NULL)
#endif
{
gpio_irqinitialize();
}
#endif
/* And finally, enable interrupts */