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 | |
parent | ca326896d0dfd7693ab3b7097d0fe3ad6ab0a0c9 (diff) | |
download | rockbox-f8bd54d5759c78d0777f25cad287a6dbeb0b45ea.tar.gz rockbox-f8bd54d5759c78d0777f25cad287a6dbeb0b45ea.zip |
iaudiox5: Fix red, due to slightly bogus asm
Change-Id: I6ebcda3452d4244b5e2d1a9bbeb9fff9a9456388
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/button-x5.c | 8 | ||||
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/lcd-as-x5.S | 12 |
2 files changed, 13 insertions, 7 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 |
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-as-x5.S b/firmware/target/coldfire/iaudio/x5/lcd-as-x5.S index c49d33ce84..e6621e1dea 100644 --- a/firmware/target/coldfire/iaudio/x5/lcd-as-x5.S +++ b/firmware/target/coldfire/iaudio/x5/lcd-as-x5.S | |||
@@ -134,7 +134,7 @@ lcd_write_yuv420_lines: | |||
134 | mac.l %a5, %d0, %acc0 | 134 | mac.l %a5, %d0, %acc0 |
135 | mac.l %a5, %d0, %acc1 | 135 | mac.l %a5, %d0, %acc1 |
136 | mac.l %a5, %d0, %acc2 | 136 | mac.l %a5, %d0, %acc2 |
137 | 137 | ||
138 | move.w %d4, (%a0) | 138 | move.w %d4, (%a0) |
139 | /* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */ | 139 | /* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */ |
140 | 140 | ||
@@ -147,7 +147,7 @@ lcd_write_yuv420_lines: | |||
147 | lsr.l %d0, %d4 | 147 | lsr.l %d0, %d4 |
148 | lsr.l %d0, %d3 | 148 | lsr.l %d0, %d3 |
149 | lsr.l %d0, %d2 | 149 | lsr.l %d0, %d2 |
150 | 150 | ||
151 | lsl.l #6, %d2 | 151 | lsl.l #6, %d2 |
152 | or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */ | 152 | or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */ |
153 | lsl.l #7, %d2 | 153 | lsl.l #7, %d2 |
@@ -190,7 +190,7 @@ lcd_write_yuv420_lines: | |||
190 | swap %d4 | 190 | swap %d4 |
191 | move.w %d4, (%a0) | 191 | move.w %d4, (%a0) |
192 | swap %d4 | 192 | swap %d4 |
193 | 193 | ||
194 | /* luma for third pixel (top right) as delta from the second */ | 194 | /* luma for third pixel (top right) as delta from the second */ |
195 | clr.l %d1 | 195 | clr.l %d1 |
196 | move.b (%a1, %a3*2), %d1 | 196 | move.b (%a1, %a3*2), %d1 |
@@ -199,7 +199,7 @@ lcd_write_yuv420_lines: | |||
199 | mac.l %a5, %d0, %acc0 | 199 | mac.l %a5, %d0, %acc0 |
200 | mac.l %a5, %d0, %acc1 | 200 | mac.l %a5, %d0, %acc1 |
201 | mac.l %a5, %d0, %acc2 | 201 | mac.l %a5, %d0, %acc2 |
202 | 202 | ||
203 | move.w %d4, (%a0) | 203 | move.w %d4, (%a0) |
204 | /* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */ | 204 | /* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */ |
205 | 205 | ||
@@ -211,7 +211,7 @@ lcd_write_yuv420_lines: | |||
211 | lsr.l %d0, %d4 | 211 | lsr.l %d0, %d4 |
212 | lsr.l %d0, %d3 | 212 | lsr.l %d0, %d3 |
213 | lsr.l %d0, %d2 | 213 | lsr.l %d0, %d2 |
214 | 214 | ||
215 | lsl.l #6, %d2 | 215 | lsl.l #6, %d2 |
216 | or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */ | 216 | or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */ |
217 | lsl.l #7, %d2 | 217 | lsl.l #7, %d2 |
@@ -264,7 +264,7 @@ lcd_write_yuv420_lines: | |||
264 | lea.l (44, %sp), %sp /* restore registers */ | 264 | lea.l (44, %sp), %sp /* restore registers */ |
265 | rts | 265 | rts |
266 | .yuv_end: | 266 | .yuv_end: |
267 | .size lcd_write_yuv420_lines, yuv_end - lcd_write_yuv420_lines | 267 | .size lcd_write_yuv420_lines, .yuv_end - lcd_write_yuv420_lines |
268 | 268 | ||
269 | 269 | ||
270 | /* begin lcd_write_data */ | 270 | /* begin lcd_write_data */ |