summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-11-30 01:02:59 +0000
committerJens Arnold <amiconn@rockbox.org>2004-11-30 01:02:59 +0000
commitbbc593128066d258002bb0a17a09c8dd33c07c46 (patch)
tree3c9bc724a2904f828e85e7eac1fb12b6071ec786
parenta5a6fa930c601298780173f889f1b9d7f867ad1a (diff)
Properly initialize Port A button input pins (player coldstart)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5471 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/button.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 23479f12fa..7e7eb97cf9 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -480,8 +480,12 @@ static int button_read(void)
void button_init(void)
{
- /* set port pins as input */
+#ifndef SIMULATOR
+ /* set PA5 and PA11 as input */
+ PACR1 &= 0xff3f; /* PA11MD = 00 */
+ PACR2 &= 0xfbff; /* PA5MD = 0 */
PAIOR &= ~0x820;
+#endif
queue_init(&button_queue);
lastbtn = 0;
tick_add_task(button_tick);