From bbc593128066d258002bb0a17a09c8dd33c07c46 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 30 Nov 2004 01:02:59 +0000 Subject: Properly initialize Port A button input pins (player coldstart) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5471 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/button.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3