summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sansa-fuze/button-fuze.c')
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/button-fuze.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
index 4a9996881d..f32776f6eb 100644
--- a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
+++ b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c
@@ -133,6 +133,12 @@ bool button_hold(void)
return hold_button;
}
+static void button_delay(void)
+{
+ int i = 32;
+ while(i--);
+}
+
static short button_dbop(void)
{
/* skip home and power reading if lcd_button_support was blocked,
@@ -153,6 +159,8 @@ static short button_dbop(void)
DBOP_TIMPOL_01 = 0xe167e167;
DBOP_TIMPOL_23 = 0xe167006e;
+ button_delay();
+
DBOP_CTRL |= (1<<15); /* start read */
while((DBOP_STAT & (1<<16)) == 0); /* wait for valid data */