summaryrefslogtreecommitdiff
path: root/firmware/target/arm/philips/hdd1630/button-hdd1630.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/philips/hdd1630/button-hdd1630.c')
-rw-r--r--firmware/target/arm/philips/hdd1630/button-hdd1630.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/firmware/target/arm/philips/hdd1630/button-hdd1630.c b/firmware/target/arm/philips/hdd1630/button-hdd1630.c
index df0f5afbed..faed6abb72 100644
--- a/firmware/target/arm/philips/hdd1630/button-hdd1630.c
+++ b/firmware/target/arm/philips/hdd1630/button-hdd1630.c
@@ -29,18 +29,6 @@
29 29
30static int int_btn = BUTTON_NONE; 30static int int_btn = BUTTON_NONE;
31 31
32/*
33 * Generate a click sound from the player (not in headphones yet)
34 * TODO: integrate this with the "key click" option
35 */
36static void button_click(void)
37{
38 GPO32_ENABLE |= 0x2000;
39 GPO32_VAL |= 0x2000;
40 udelay(1000);
41 GPO32_VAL &= ~0x2000;
42}
43
44#ifndef BOOTLOADER 32#ifndef BOOTLOADER
45void button_init_device(void) 33void button_init_device(void)
46{ 34{
@@ -59,7 +47,7 @@ void button_int(void)
59 int_btn = BUTTON_NONE; 47 int_btn = BUTTON_NONE;
60 48
61 val = touchpad_read_device(data, 4); 49 val = touchpad_read_device(data, 4);
62 50
63 if (val == MEP_BUTTON_HEADER) 51 if (val == MEP_BUTTON_HEADER)
64 { 52 {
65 /* Buttons packet */ 53 /* Buttons packet */
@@ -96,7 +84,6 @@ bool button_hold(void)
96 */ 84 */
97int button_read_device(void) 85int button_read_device(void)
98{ 86{
99 static int btn_old = BUTTON_NONE;
100 int btn = int_btn; 87 int btn = int_btn;
101 88
102 /* Hold */ 89 /* Hold */
@@ -111,11 +98,6 @@ int button_read_device(void)
111 if (!(GPIOD_INPUT_VAL & 0x20)) btn |= BUTTON_PLAYLIST; 98 if (!(GPIOD_INPUT_VAL & 0x20)) btn |= BUTTON_PLAYLIST;
112 if (!(GPIOD_INPUT_VAL & 0x40)) btn |= BUTTON_POWER; 99 if (!(GPIOD_INPUT_VAL & 0x40)) btn |= BUTTON_POWER;
113 100
114 if ((btn != btn_old) && (btn != BUTTON_NONE))
115 button_click();
116
117 btn_old = btn;
118
119 return btn; 101 return btn;
120} 102}
121 103