summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-19 14:30:34 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-19 14:30:34 +0000
commit8e12292e758b944fdc934f8ff87c838cd7acb689 (patch)
treee4acad648c639be2072988fd78209b48f3b11a57 /firmware
parent627baea9533633c7d09d778601df7ce3c6f8f66d (diff)
downloadrockbox-8e12292e758b944fdc934f8ff87c838cd7acb689.tar.gz
rockbox-8e12292e758b944fdc934f8ff87c838cd7acb689.tar.bz2
rockbox-8e12292e758b944fdc934f8ff87c838cd7acb689.zip
better preprocessor conditions for enabling GPIOA interrupt
it's only needed if we hotswap the µSD or if we build the fuzev2 scrollwheel code without irq (which we don't do anyway) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26165 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/system-as3525.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 0bb8c4ce95..5614427e20 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -122,7 +122,8 @@ struct vec_int_src vec_int_srcs[] =
{ INT_SRC_TIMER2, INT_TIMER2 },
{ INT_SRC_I2C_AUDIO, INT_I2C_AUDIO },
{ INT_SRC_AUDIO, INT_AUDIO },
-#ifdef HAVE_HOTSWAP
+#if defined(HAVE_HOTSWAP) || \
+ (defined(SANSA_FUZEV2) && !defined(INCREASED_SCROLLWHEEL_POLLING)
{ INT_SRC_GPIOA, INT_GPIOA, },
#endif
/* Lowest priority at the end of the list */
@@ -150,11 +151,11 @@ static void setup_vic(void)
void INT_GPIOA(void)
{
-#ifdef HAVE_MULTIDRIVE
+#ifdef HAVE_HOTSWAP
void sd_gpioa_isr(void);
sd_gpioa_isr();
#endif
-#if (defined(HAVE_SCROLLWHEEL) && CONFIG_CPU != AS3525)
+#if defined(SANSA_FUZEV2) && !defined(INCREASED_SCROLLWHEEL_POLLING
void button_gpioa_isr(void);
button_gpioa_isr();
#endif
@@ -368,8 +369,9 @@ void system_init(void)
ascodec_init();
#ifndef BOOTLOADER
- /* setup isr for microsd monitoring and for scrollwheel irq */
-#if defined(HAVE_MULTIDRIVE) || (defined(HAVE_SCROLLWHEEL) && CONFIG_CPU != AS3525)
+ /* setup isr for microsd monitoring and for fuzev2 scrollwheel irq */
+#if defined(HAVE_HOTSWAP) || \
+ (defined(SANSA_FUZEV2) && !defined(INCREASED_SCROLLWHEEL_POLLING)
VIC_INT_ENABLE = (INTERRUPT_GPIOA);
/* pin selection for irq happens in the drivers */
#endif