diff options
author | Szymon Dziok <b0hoon@o2.pl> | 2014-11-08 21:12:24 +0100 |
---|---|---|
committer | Szymon Dziok <b0hoon@o2.pl> | 2014-11-10 21:40:47 +0100 |
commit | bcca1114383c2147e60e73825ec68403c90bea40 (patch) | |
tree | e07dcc5f35478d20c5db328e2f2430cea997e185 /firmware/target/arm/philips/hdd1630 | |
parent | 73a780265a25371c0d58d7784fa52946011606cc (diff) | |
download | rockbox-bcca1114383c2147e60e73825ec68403c90bea40.tar.gz rockbox-bcca1114383c2147e60e73825ec68403c90bea40.zip |
HDD1630/HDD6330/SA9200: Integration of the clicker with the "Keyclick" menu.
Change-Id: Ieb26f2252c1f2613cc9bd83c8349f49113f46d87
Diffstat (limited to 'firmware/target/arm/philips/hdd1630')
-rw-r--r-- | firmware/target/arm/philips/hdd1630/button-hdd1630.c | 20 |
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 | ||
30 | static int int_btn = BUTTON_NONE; | 30 | static 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 | */ | ||
36 | static 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 |
45 | void button_init_device(void) | 33 | void 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 | */ |
97 | int button_read_device(void) | 85 | int 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 | ||