summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-c200v2
diff options
context:
space:
mode:
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 @@
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id: button-e200v2.c 19035 2008-11-07 05:31:05Z jdgordon $ 8 * $Id: button-c200v2.c 19035 2008-11-07 05:31:05Z jdgordon $
9 * 9 *
10 * Copyright (C) 2006 by Barry Wardell 10 * Copyright (C) 2006 by Barry Wardell, (C) 2009 by Bertrik Sikken
11 * 11 *
12 * This program is free software; you can redistribute it and/or 12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 13 * modify it under the terms of the GNU General Public License
@@ -19,29 +19,20 @@
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21 21
22#include "config.h"
22#include "system.h" 23#include "system.h"
23#include "button-target.h" 24#include "button-target.h"
24#include "button.h" 25#include "button.h"
25#include "backlight.h" 26#include "backlight.h"
26#include "powermgmt.h" 27#include "dbop-as3525.h"
27 28
28 29static unsigned short _dbop_din;
29static unsigned short _dbop_din = 0xFFFF;
30
31/* in the lcd driver */
32extern unsigned short int lcd_dbop_input(void);
33 30
34static bool hold_button = false; 31static bool hold_button = false;
35#ifndef BOOTLOADER 32#ifndef BOOTLOADER
36static bool hold_button_old = false; 33static bool hold_button_old = false;
37#endif 34#endif
38 35
39/* for the debug menu */
40unsigned short button_dbop_data(void)
41{
42 return _dbop_din;
43}
44
45void button_init_device(void) 36void button_init_device(void)
46{ 37{
47 GPIOA_DIR &= ~(1<<3); 38 GPIOA_DIR &= ~(1<<3);
@@ -59,7 +50,7 @@ int button_read_device(void)
59{ 50{
60 int btn = BUTTON_NONE; 51 int btn = BUTTON_NONE;
61 52
62 _dbop_din = lcd_dbop_input(); 53 _dbop_din = dbop_read_input();
63 54
64 /* hold button handling */ 55 /* hold button handling */
65 hold_button = ((_dbop_din & (1<<12)) == 0); 56 hold_button = ((_dbop_din & (1<<12)) == 0);