diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-24 04:23:52 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-24 04:23:52 +0000 |
commit | 68e24d3a16f3472121a38d75aeafcc9d9c94a136 (patch) | |
tree | 14287aa0d4fc012d0eb40280998d51a76e4dbc93 /rbutil/mkamsboot/dualboot.S | |
parent | c97f640060cd13ba4fed041f1f1feecd84aa2ae0 (diff) | |
download | rockbox-68e24d3a16f3472121a38d75aeafcc9d9c94a136.tar.gz rockbox-68e24d3a16f3472121a38d75aeafcc9d9c94a136.zip |
Commit updated mkamsboot for c200v2 patching. Tested and seems to be working using USB for dualboot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19575 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/dualboot.S')
-rw-r--r-- | rbutil/mkamsboot/dualboot.S | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/rbutil/mkamsboot/dualboot.S b/rbutil/mkamsboot/dualboot.S index 4d19b020a3..6cdc88de18 100644 --- a/rbutil/mkamsboot/dualboot.S +++ b/rbutil/mkamsboot/dualboot.S | |||
@@ -81,12 +81,16 @@ uclcopy: | |||
81 | #ifndef SANSA_M200V4 /* this doesnt work for m200 */ | 81 | #ifndef SANSA_M200V4 /* this doesnt work for m200 */ |
82 | /* we check A3 unconditionally of the model because it seems to be */ | 82 | /* we check A3 unconditionally of the model because it seems to be */ |
83 | /* either hold, either usb on every model */ | 83 | /* either hold, either usb on every model */ |
84 | /* TODO: make it USB on all AMS Sansas for consistency, USB is safer too */ | ||
84 | 85 | ||
85 | ldr r0, =GPIOA | 86 | ldr r0, =GPIOA |
86 | mov r1, #0 | 87 | mov r1, #0 |
87 | str r1, [r0, #0x400] | 88 | str r1, [r0, #0x400] |
89 | #ifdef SANSA_C200V2 | ||
90 | ldr r1, [r0, #0x8] /* USB is A1 on C200 */ | ||
91 | #else | ||
88 | ldr r1, [r0, #0x20] /* read pin A3 */ | 92 | ldr r1, [r0, #0x20] /* read pin A3 */ |
89 | 93 | #endif | |
90 | cmp r1, #0 | 94 | cmp r1, #0 |
91 | bne boot_of | 95 | bne boot_of |
92 | #endif | 96 | #endif |
@@ -118,6 +122,16 @@ uclcopy: | |||
118 | 122 | ||
119 | cmp r1, #0 /* C3 = #0 means button pressed */ | 123 | cmp r1, #0 /* C3 = #0 means button pressed */ |
120 | beq boot_of | 124 | beq boot_of |
125 | #elif defined(SANSA_C200V2) | ||
126 | /* check for RIGHT on C6, should maybe changed to LEFT as soon as it | ||
127 | * known in which pin that is in order for consistency */ | ||
128 | ldr r0, =GPIOC | ||
129 | mov r1, #0 | ||
130 | str r1, [r0, #0x400] /* set pin to output */ | ||
131 | |||
132 | ldr r1, [r0, #256] /* 1<<(6+2) */ | ||
133 | cmp r1, #0 /* C6 low means button pressed */ | ||
134 | beq boot_of | ||
121 | #elif defined(SANSA_M200V4) | 135 | #elif defined(SANSA_M200V4) |
122 | /* LEFT button */ | 136 | /* LEFT button */ |
123 | .set row, (1<<5) /* enable output on A5 */ | 137 | .set row, (1<<5) /* enable output on A5 */ |