summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-c200v2
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-01-06 23:41:36 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-01-06 23:41:36 +0000
commit57667c51cf09de052222484ce94fbd6da113a55c (patch)
treeb85872be9b6c204e7d66a9203a64d78c524a38a5 /firmware/target/arm/as3525/sansa-c200v2
parent8e8e2627b27b28a855881db09f2c16bfb2193050 (diff)
Sansa AMS: refactor DBOP button reading (e200v2/Fuze/c200v2)
This gets rid of LCD glitches on Sansa Fuze, and now LCD transfers can get interrupted by button reading Flyspray: FS #10603 Author: Bertrik Sikken git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-c200v2')
-rw-r--r--firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c b/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c
index b7ce7330c0..8a95c2d661 100644
--- a/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c
+++ b/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c
@@ -5,9 +5,9 @@
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
- * $Id: button-e200v2.c 19035 2008-11-07 05:31:05Z jdgordon $
+ * $Id: button-c200v2.c 19035 2008-11-07 05:31:05Z jdgordon $
*
- * Copyright (C) 2006 by Barry Wardell
+ * Copyright (C) 2006 by Barry Wardell, (C) 2009 by Bertrik Sikken
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -19,29 +19,20 @@
*
****************************************************************************/
+#include "config.h"
#include "system.h"
#include "button-target.h"
#include "button.h"
#include "backlight.h"
-#include "powermgmt.h"
+#include "dbop-as3525.h"
-
-static unsigned short _dbop_din = 0xFFFF;
-
-/* in the lcd driver */
-extern unsigned short int lcd_dbop_input(void);
+static unsigned short _dbop_din;
static bool hold_button = false;
#ifndef BOOTLOADER
static bool hold_button_old = false;
#endif
-/* for the debug menu */
-unsigned short button_dbop_data(void)
-{
- return _dbop_din;
-}
-
void button_init_device(void)
{
GPIOA_DIR &= ~(1<<3);
@@ -59,7 +50,7 @@ int button_read_device(void)
{
int btn = BUTTON_NONE;
- _dbop_din = lcd_dbop_input();
+ _dbop_din = dbop_read_input();
/* hold button handling */
hold_button = ((_dbop_din & (1<<12)) == 0);