diff options
-rw-r--r-- | firmware/target/coldfire/mpio/hd200/button-hd200.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/button-hd200.c b/firmware/target/coldfire/mpio/hd200/button-hd200.c index fa0a5cf3cf..fba5c0b74e 100644 --- a/firmware/target/coldfire/mpio/hd200/button-hd200.c +++ b/firmware/target/coldfire/mpio/hd200/button-hd200.c | |||
@@ -37,12 +37,11 @@ static bool remote_detect(void) | |||
37 | 37 | ||
38 | void button_init_device(void) | 38 | void button_init_device(void) |
39 | { | 39 | { |
40 | /* GPIO56 (main PLAY) | 40 | /* GPIO56 (main PLAY) general input |
41 | * GPIO41 (remote PLAY) | 41 | * GPIO41 (remote PLAY) is shared with Audio Serial Data |
42 | * as general purpose inputs | ||
43 | */ | 42 | */ |
44 | or_l((1<<24)|(1<<9),&GPIO1_FUNCTION); | 43 | or_l((1<<24),&GPIO1_FUNCTION); |
45 | and_l(~((1<<24)|(1<<9)),&GPIO1_ENABLE); | 44 | and_l(~(1<<24),&GPIO1_ENABLE); |
46 | } | 45 | } |
47 | 46 | ||
48 | bool button_hold(void) | 47 | bool button_hold(void) |
@@ -92,7 +91,7 @@ int button_read_device(void) | |||
92 | { | 91 | { |
93 | data = adc_scan(ADC_BUTTONS); | 92 | data = adc_scan(ADC_BUTTONS); |
94 | 93 | ||
95 | if (data < 2250) /* valid button */ | 94 | if (data < 2300) /* valid button */ |
96 | { | 95 | { |
97 | if (data < 900) /* middle */ | 96 | if (data < 900) /* middle */ |
98 | { | 97 | { |
@@ -121,7 +120,7 @@ int button_read_device(void) | |||
121 | if (data < 1900) | 120 | if (data < 1900) |
122 | /* 1900 - 1600 */ | 121 | /* 1900 - 1600 */ |
123 | btn = BUTTON_PREV; | 122 | btn = BUTTON_PREV; |
124 | else /* 1900 - 2250 */ | 123 | else /* 1900 - 2300 */ |
125 | btn = BUTTON_SELECT; | 124 | btn = BUTTON_SELECT; |
126 | } | 125 | } |
127 | } | 126 | } |