1
0
Fork 0
forked from len0rd/rockbox

Sansa Clip+: Unset B0 correctly in dualboot.S

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24582 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jack Halpin 2010-02-10 14:35:52 +00:00
parent c447eb90cb
commit aa8da2333e
2 changed files with 6 additions and 7 deletions

View file

@ -126,8 +126,8 @@ unsigned char dualboot_clipplus[256] = {
0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 0x00, 0x10, 0x80, 0xe5, 0x80, 0x00, 0x9f, 0xe5,
0x01, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x04, 0x10, 0x80, 0xe5, 0x7d, 0x1f, 0xa0, 0xe3,
0x01, 0x10, 0x51, 0xe2, 0xfd, 0xff, 0xff, 0x1a, 0x68, 0x00, 0x9f, 0xe5, 0x20, 0x10, 0x90, 0xe5,
0x64, 0x00, 0x9f, 0xe5, 0x08, 0x20, 0x90, 0xe5, 0x01, 0x20, 0x82, 0xe1, 0x00, 0x10, 0xa0, 0xe3,
0x04, 0x10, 0x80, 0xe5, 0x48, 0x00, 0x9f, 0xe5, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x00, 0x52, 0xe3,
0x64, 0x00, 0x9f, 0xe5, 0x08, 0x20, 0x90, 0xe5, 0x01, 0x20, 0x82, 0xe1, 0x50, 0x00, 0x9f, 0xe5,
0x00, 0x10, 0xa0, 0xe3, 0x04, 0x10, 0x80, 0xe5, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x00, 0x52, 0xe3,
0x02, 0x00, 0x00, 0x1a, 0x8c, 0x00, 0x1f, 0xe5, 0x8c, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea,
0xa0, 0x00, 0x1f, 0xe5, 0xa0, 0x10, 0x1f, 0xe5, 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4,
0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2,

View file

@ -157,7 +157,8 @@ uclcopy:
cmp r1, #0 /* C3 = #0 means button pressed */
beq boot_of
#elif defined(SANSA_CLIPPLUS)
@ Assumes GPIOB_DIR is 0x00 on reset
@ All GPIO_DIR == 0x00 from reset
@ Set B0
ldr r0, =GPIOB
mov r1, #(1<<0) @ pin 0
str r1, [r0, #0x400] @ GPIOB(0) = output
@ -176,12 +177,10 @@ uclcopy:
orr r2, r2, r1 @ c3 || A1
@ Unset GPIOB(0)
@ Unset GPIOB(0) & Restore GPIOB_DIR
ldr r0, =GPIOB
mov r1, #0
str r1, [r0, #4*(1<<0)] @ write 0 to GPIOB(0) B0 unset
@ restore GPIOB_DIR to 0x00
ldr r0, =GPIOB
str r1, [r0, #0x400] @ Restore GPIOB_DIR to 0x00
cmp r2, #0 @ test input from pins