summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot/dualboot.S
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/mkamsboot/dualboot.S')
-rw-r--r--rbutil/mkamsboot/dualboot.S16
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 */