diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-13 14:18:35 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-13 14:18:35 -0400 |
commit | f8bd54d5759c78d0777f25cad287a6dbeb0b45ea (patch) | |
tree | e2e4e79cd7bd166ceecb21d0dfd4acb530e1b69c /firmware/target/coldfire/iaudio/x5/button-x5.c | |
parent | ca326896d0dfd7693ab3b7097d0fe3ad6ab0a0c9 (diff) | |
download | rockbox-f8bd54d5759c78d0777f25cad287a6dbeb0b45ea.tar.gz rockbox-f8bd54d5759c78d0777f25cad287a6dbeb0b45ea.zip |
iaudiox5: Fix red, due to slightly bogus asm
Change-Id: I6ebcda3452d4244b5e2d1a9bbeb9fff9a9456388
Diffstat (limited to 'firmware/target/coldfire/iaudio/x5/button-x5.c')
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/button-x5.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/button-x5.c b/firmware/target/coldfire/iaudio/x5/button-x5.c index e1f68de36b..b94a0de678 100644 --- a/firmware/target/coldfire/iaudio/x5/button-x5.c +++ b/firmware/target/coldfire/iaudio/x5/button-x5.c | |||
@@ -60,14 +60,18 @@ bool remote_button_hold(void) | |||
60 | int button_read_device(void) | 60 | int button_read_device(void) |
61 | { | 61 | { |
62 | int btn = BUTTON_NONE; | 62 | int btn = BUTTON_NONE; |
63 | #ifndef BOOTLOADER | ||
63 | bool hold_button_old; | 64 | bool hold_button_old; |
64 | bool remote_hold_button_old; | 65 | bool remote_hold_button_old; |
66 | #endif | ||
65 | static int prev_data = 0xff; | 67 | static int prev_data = 0xff; |
66 | static int last_valid = 0xff; | 68 | static int last_valid = 0xff; |
67 | int data; | 69 | int data; |
68 | 70 | ||
69 | /* normal buttons */ | 71 | /* normal buttons */ |
72 | #ifndef BOOTLOADER | ||
70 | hold_button_old = hold_button; | 73 | hold_button_old = hold_button; |
74 | #endif | ||
71 | hold_button = button_hold(); | 75 | hold_button = button_hold(); |
72 | 76 | ||
73 | #ifndef BOOTLOADER | 77 | #ifndef BOOTLOADER |
@@ -86,7 +90,7 @@ int button_read_device(void) | |||
86 | last_valid = data; | 90 | last_valid = data; |
87 | prev_data = data; | 91 | prev_data = data; |
88 | data = last_valid; | 92 | data = last_valid; |
89 | 93 | ||
90 | if (data < 0xf0) | 94 | if (data < 0xf0) |
91 | { | 95 | { |
92 | if(data < 0x7c) | 96 | if(data < 0x7c) |
@@ -114,7 +118,9 @@ int button_read_device(void) | |||
114 | /* remote buttons */ | 118 | /* remote buttons */ |
115 | data = remote_detect() ? adc_scan(ADC_REMOTE) : 0xff; | 119 | data = remote_detect() ? adc_scan(ADC_REMOTE) : 0xff; |
116 | 120 | ||
121 | #ifndef BOOTLOADER | ||
117 | remote_hold_button_old = remote_hold_button; | 122 | remote_hold_button_old = remote_hold_button; |
123 | #endif | ||
118 | remote_hold_button = data < 0x17; | 124 | remote_hold_button = data < 0x17; |
119 | 125 | ||
120 | #ifndef BOOTLOADER | 126 | #ifndef BOOTLOADER |