rp2040-playground/with_sdk/rp2350/blink/led.s
jmug b5796f0d6e Move the sdk project to a subdir.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-05-18 23:11:20 -07:00

25 lines
361 B
ArmAsm

.section .text
.equ sio_base, 0xd0000000
.equ big_num, 0x00f00000 // For the delay.
.thumb_func
.global blink
blink:
ldr r0, =sio_base
mov r1, #1
lsl r1, r1, #25
led_loop:
str r1, [r0, #0x18] // GPIO_OUT_SET
ldr r3, =big_num
bl delay
str r1, [r0, #0x20] // GPIO_OUT_CLR
ldr r3, =big_num
bl delay
b led_loop
delay:
sub r3, #1
bne delay
bx lr