diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-07-06 14:44:41 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-07-06 14:44:41 +0000 |
commit | 3cdee0f09b677369a745bdb8098367b0946e29a1 (patch) | |
tree | 022a9c4ceb94e51b59745f6f5006f6a115bdc71d /firmware | |
parent | 7c908bbeda55d313a8c769d5d1faece2e33b3059 (diff) | |
download | rockbox-3cdee0f09b677369a745bdb8098367b0946e29a1.tar.gz rockbox-3cdee0f09b677369a745bdb8098367b0946e29a1.zip |
HD200 - Fix GPIO setup in button_init_device()- this change fixes sound output broken in r27258. Slightly adjust main buttons reading routine so key reading is more reliable with and without remote present
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27307 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-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) void button_init_device(void) { - /* GPIO56 (main PLAY) - * GPIO41 (remote PLAY) - * as general purpose inputs + /* GPIO56 (main PLAY) general input + * GPIO41 (remote PLAY) is shared with Audio Serial Data */ - or_l((1<<24)|(1<<9),&GPIO1_FUNCTION); - and_l(~((1<<24)|(1<<9)),&GPIO1_ENABLE); + or_l((1<<24),&GPIO1_FUNCTION); + and_l(~(1<<24),&GPIO1_ENABLE); } bool button_hold(void) @@ -92,7 +91,7 @@ int button_read_device(void) { data = adc_scan(ADC_BUTTONS); - if (data < 2250) /* valid button */ + if (data < 2300) /* valid button */ { if (data < 900) /* middle */ { @@ -121,7 +120,7 @@ int button_read_device(void) if (data < 1900) /* 1900 - 1600 */ btn = BUTTON_PREV; - else /* 1900 - 2250 */ + else /* 1900 - 2300 */ btn = BUTTON_SELECT; } } |