summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-06-17 00:07:23 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-06-17 00:07:23 +0000
commit8768ee82cc6d8340ab067d13ae84df4a2b87975e (patch)
tree6f720eb92f3c9ed50a687057d327f3ed4e2595ef
parentfa1a290eb151c47423cb7c3e8d83de32e13bbe5f (diff)
downloadrockbox-8768ee82cc6d8340ab067d13ae84df4a2b87975e.tar.gz
rockbox-8768ee82cc6d8340ab067d13ae84df4a2b87975e.zip
PP5024 (e200): There's more than one HI IRQ bit for enabling GPIO IRQs. Port A uses bit 32 and port F,H use bit 33. Please add futher GPIOx_IRQ/MASK defines and associations to pp5024.h as they are discovered. I guess the SD card patch will need a small update to properly detect insertion.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13647 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/pp5024.h8
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/button-e200.c2
-rw-r--r--firmware/target/arm/system-pp502x.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/firmware/export/pp5024.h b/firmware/export/pp5024.h
index 59c003613b..e7758b9ce5 100644
--- a/firmware/export/pp5024.h
+++ b/firmware/export/pp5024.h
@@ -24,9 +24,13 @@
#include "pp5020.h"
#undef GPIO_IRQ
-#define GPIO_IRQ (32+1)
+/* Ports A, ?? */
+#define GPIO0_IRQ (32+0)
+/* Ports F, H, ?? */
+#define GPIO1_IRQ (32+1)
#undef GPIO_MASK
-#define GPIO_MASK (1 << (GPIO_IRQ-32))
+#define GPIO0_MASK (1 << (GPIO0_IRQ-32))
+#define GPIO1_MASK (1 << (GPIO1_IRQ-32))
#endif
diff --git a/firmware/target/arm/sandisk/sansa-e200/button-e200.c b/firmware/target/arm/sandisk/sansa-e200/button-e200.c
index 6365a3f4d4..5e2c38e8e3 100644
--- a/firmware/target/arm/sandisk/sansa-e200/button-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/button-e200.c
@@ -84,7 +84,7 @@ void button_init_device(void)
GPIOH_INT_EN |= 0xc0;
CPU_INT_EN = HI_MASK;
- CPU_HI_INT_EN = GPIO_MASK;
+ CPU_HI_INT_EN = GPIO1_MASK;
#endif /* BOOTLOADER */
}
diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c
index 2b6a801128..ef0c62dcf5 100644
--- a/firmware/target/arm/system-pp502x.c
+++ b/firmware/target/arm/system-pp502x.c
@@ -68,7 +68,7 @@ void irq(void)
else if (CPU_INT_STAT & TIMER2_MASK)
TIMER2();
#ifdef SANSA_E200
- else if (CPU_HI_INT_STAT & GPIO_MASK)
+ else if (CPU_HI_INT_STAT & GPIO1_MASK)
{
if (GPIOF_INT_STAT & 0xff)
button_int();