I have 2 leds and one button. both green and yellow led off when booting from card. When the button is pressed, i want to turn green led off and yellow led on.
However, I have to write assembly. I don't understand setting input and reading from pin.
mov r1,#0 lsl r1,#6 str r1,[r0,#8]
I set gpio as input wtih first and last line ;
mov r1,#0 and
- I'm not sure about the second line,
lsl r1,**#6**" for
Condition check function:
ldr r2, =0x20200036 ldr r0, =0x20200000 ldrb r1,[r2] cmp r1, #64 beq sari$
I want to if this function return true goto sari$ loop.