forked from len0rd/rockbox
iaudiox5: Fix red, due to slightly bogus asm
Change-Id: I6ebcda3452d4244b5e2d1a9bbeb9fff9a9456388
This commit is contained in:
parent
ca326896d0
commit
f8bd54d575
2 changed files with 13 additions and 7 deletions
|
@ -60,14 +60,18 @@ bool remote_button_hold(void)
|
||||||
int button_read_device(void)
|
int button_read_device(void)
|
||||||
{
|
{
|
||||||
int btn = BUTTON_NONE;
|
int btn = BUTTON_NONE;
|
||||||
|
#ifndef BOOTLOADER
|
||||||
bool hold_button_old;
|
bool hold_button_old;
|
||||||
bool remote_hold_button_old;
|
bool remote_hold_button_old;
|
||||||
|
#endif
|
||||||
static int prev_data = 0xff;
|
static int prev_data = 0xff;
|
||||||
static int last_valid = 0xff;
|
static int last_valid = 0xff;
|
||||||
int data;
|
int data;
|
||||||
|
|
||||||
/* normal buttons */
|
/* normal buttons */
|
||||||
|
#ifndef BOOTLOADER
|
||||||
hold_button_old = hold_button;
|
hold_button_old = hold_button;
|
||||||
|
#endif
|
||||||
hold_button = button_hold();
|
hold_button = button_hold();
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
|
@ -86,7 +90,7 @@ int button_read_device(void)
|
||||||
last_valid = data;
|
last_valid = data;
|
||||||
prev_data = data;
|
prev_data = data;
|
||||||
data = last_valid;
|
data = last_valid;
|
||||||
|
|
||||||
if (data < 0xf0)
|
if (data < 0xf0)
|
||||||
{
|
{
|
||||||
if(data < 0x7c)
|
if(data < 0x7c)
|
||||||
|
@ -114,7 +118,9 @@ int button_read_device(void)
|
||||||
/* remote buttons */
|
/* remote buttons */
|
||||||
data = remote_detect() ? adc_scan(ADC_REMOTE) : 0xff;
|
data = remote_detect() ? adc_scan(ADC_REMOTE) : 0xff;
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
remote_hold_button_old = remote_hold_button;
|
remote_hold_button_old = remote_hold_button;
|
||||||
|
#endif
|
||||||
remote_hold_button = data < 0x17;
|
remote_hold_button = data < 0x17;
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
|
|
|
@ -134,7 +134,7 @@ lcd_write_yuv420_lines:
|
||||||
mac.l %a5, %d0, %acc0
|
mac.l %a5, %d0, %acc0
|
||||||
mac.l %a5, %d0, %acc1
|
mac.l %a5, %d0, %acc1
|
||||||
mac.l %a5, %d0, %acc2
|
mac.l %a5, %d0, %acc2
|
||||||
|
|
||||||
move.w %d4, (%a0)
|
move.w %d4, (%a0)
|
||||||
/* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */
|
/* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ lcd_write_yuv420_lines:
|
||||||
lsr.l %d0, %d4
|
lsr.l %d0, %d4
|
||||||
lsr.l %d0, %d3
|
lsr.l %d0, %d3
|
||||||
lsr.l %d0, %d2
|
lsr.l %d0, %d2
|
||||||
|
|
||||||
lsl.l #6, %d2
|
lsl.l #6, %d2
|
||||||
or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */
|
or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */
|
||||||
lsl.l #7, %d2
|
lsl.l #7, %d2
|
||||||
|
@ -190,7 +190,7 @@ lcd_write_yuv420_lines:
|
||||||
swap %d4
|
swap %d4
|
||||||
move.w %d4, (%a0)
|
move.w %d4, (%a0)
|
||||||
swap %d4
|
swap %d4
|
||||||
|
|
||||||
/* luma for third pixel (top right) as delta from the second */
|
/* luma for third pixel (top right) as delta from the second */
|
||||||
clr.l %d1
|
clr.l %d1
|
||||||
move.b (%a1, %a3*2), %d1
|
move.b (%a1, %a3*2), %d1
|
||||||
|
@ -199,7 +199,7 @@ lcd_write_yuv420_lines:
|
||||||
mac.l %a5, %d0, %acc0
|
mac.l %a5, %d0, %acc0
|
||||||
mac.l %a5, %d0, %acc1
|
mac.l %a5, %d0, %acc1
|
||||||
mac.l %a5, %d0, %acc2
|
mac.l %a5, %d0, %acc2
|
||||||
|
|
||||||
move.w %d4, (%a0)
|
move.w %d4, (%a0)
|
||||||
/* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */
|
/* 2nd LCD write is delayed one pixel to use it for filling the EMAC latency */
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ lcd_write_yuv420_lines:
|
||||||
lsr.l %d0, %d4
|
lsr.l %d0, %d4
|
||||||
lsr.l %d0, %d3
|
lsr.l %d0, %d3
|
||||||
lsr.l %d0, %d2
|
lsr.l %d0, %d2
|
||||||
|
|
||||||
lsl.l #6, %d2
|
lsl.l #6, %d2
|
||||||
or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */
|
or.l %d3, %d2 /* |00000000|00000000|0000Rrrr|rrGggggg| */
|
||||||
lsl.l #7, %d2
|
lsl.l #7, %d2
|
||||||
|
@ -264,7 +264,7 @@ lcd_write_yuv420_lines:
|
||||||
lea.l (44, %sp), %sp /* restore registers */
|
lea.l (44, %sp), %sp /* restore registers */
|
||||||
rts
|
rts
|
||||||
.yuv_end:
|
.yuv_end:
|
||||||
.size lcd_write_yuv420_lines, yuv_end - lcd_write_yuv420_lines
|
.size lcd_write_yuv420_lines, .yuv_end - lcd_write_yuv420_lines
|
||||||
|
|
||||||
|
|
||||||
/* begin lcd_write_data */
|
/* begin lcd_write_data */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue