Use ## to create sections (Learn more)
diff --git a/rbutil/mkamsboot/dualboot/dualboot.S b/rbutil/mkamsboot/dualboot/du
index fe1a64b..7a2b230 100644
@@ -157,10 +157,22 @@ uclcopy:
cmp r1, #0 /* C3 = #0 means button pressed */
- /* TODO */
+ ldr r0, =GPIOA
+ ldr r1, [r0, #0x400] @ r1 = GPIOA_DIR
+ bic r2, r1, #(1<<1) @ A1 = input
+ str r2, [r0, #0x400] @ write back direction
+ ldr r2, [r0, #4*(1<<1)] @ read A1
+ str r1, [r0, #0x400] @ write back original GPIOA_DIR
+ ands r2, #(1<<1) @ test A1
+ beq immediate @ boot immediately if unset
mov r0, #0x500000 /* Approximately 5 seconds */
1: subs r0, r0, #1 /* just to prove we are running */
b boot_of /* branch to OF */
/* check for RIGHT on C6, should changed to LEFT as soon as it
Share the private access URL responsibly.
Anyone will be able to find and view this paste. Google will index it.
All your pastes are belong to us.