diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-04-20 20:11:01 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-04-20 20:11:01 +0000 |
commit | e29358c154e5412737dbc9375c90b3046c49b90b (patch) | |
tree | bcca0390d65bc9d3311fcebba5961be2b6fa4bcb /firmware/target/arm/as3525/sansa-e200v2/button-e200v2.c | |
parent | f4ac75752e7b76b8aa24208a8d344b427351af6d (diff) | |
download | rockbox-e29358c154e5412737dbc9375c90b3046c49b90b.tar.gz rockbox-e29358c154e5412737dbc9375c90b3046c49b90b.zip |
Fix FS#10128 - The View IO Ports debug menu showed weird dbop values (sometimes FFFF prepended), due to sign-extension. Switch to unsigned short to fix it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20757 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-e200v2/button-e200v2.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/button-e200v2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/button-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/button-e200v2.c index 932ce2bada..624466b1a6 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/button-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/button-e200v2.c | |||
@@ -31,7 +31,7 @@ static bool hold_button = false; | |||
31 | #ifndef BOOTLOADER | 31 | #ifndef BOOTLOADER |
32 | static bool hold_button_old = false; | 32 | static bool hold_button_old = false; |
33 | #endif | 33 | #endif |
34 | static short _dbop_din = 0; | 34 | static unsigned short _dbop_din = 0; |
35 | 35 | ||
36 | #define WHEEL_REPEAT_INTERVAL (HZ/5) | 36 | #define WHEEL_REPEAT_INTERVAL (HZ/5) |
37 | /* in the lcd driver */ | 37 | /* in the lcd driver */ |
@@ -48,7 +48,7 @@ bool button_hold(void) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | #if !defined(BOOTLOADER) && defined(HAVE_SCROLLWHEEL) | 50 | #if !defined(BOOTLOADER) && defined(HAVE_SCROLLWHEEL) |
51 | static void scrollwheel(short dbop_din) | 51 | static void scrollwheel(unsigned short dbop_din) |
52 | { | 52 | { |
53 | /* current wheel values, parsed from dbop and the resulting button */ | 53 | /* current wheel values, parsed from dbop and the resulting button */ |
54 | unsigned wheel_value = 0; | 54 | unsigned wheel_value = 0; |
@@ -132,7 +132,7 @@ static void scrollwheel(short dbop_din) | |||
132 | } | 132 | } |
133 | #endif /* !defined(BOOTLOADER) && defined(HAVE_SCROLLWHEEL) */ | 133 | #endif /* !defined(BOOTLOADER) && defined(HAVE_SCROLLWHEEL) */ |
134 | 134 | ||
135 | short button_read_dbop(void) | 135 | unsigned short button_read_dbop(void) |
136 | { | 136 | { |
137 | /*write a red pixel */ | 137 | /*write a red pixel */ |
138 | if (!lcd_button_support()) | 138 | if (!lcd_button_support()) |
@@ -161,7 +161,7 @@ short button_read_dbop(void) | |||
161 | return _dbop_din; | 161 | return _dbop_din; |
162 | } | 162 | } |
163 | 163 | ||
164 | short button_dbop_data(void) | 164 | unsigned short button_dbop_data(void) |
165 | { | 165 | { |
166 | return _dbop_din; | 166 | return _dbop_din; |
167 | } | 167 | } |
@@ -173,7 +173,7 @@ int button_read_device(void) | |||
173 | { | 173 | { |
174 | int btn = BUTTON_NONE; | 174 | int btn = BUTTON_NONE; |
175 | /* read buttons from dbop */ | 175 | /* read buttons from dbop */ |
176 | short dbop = button_read_dbop(); | 176 | unsigned short dbop = button_read_dbop(); |
177 | 177 | ||
178 | /* hold button */ | 178 | /* hold button */ |
179 | if(dbop & (1<<12)) | 179 | if(dbop & (1<<12)) |