Added serv and made a blinky testbench for it
This commit is contained in:
17
sw/blinky/blinky.S
Normal file
17
sw/blinky/blinky.S
Normal file
@@ -0,0 +1,17 @@
|
||||
#define GPIO_BASE 0x80000000
|
||||
#define DELAY 100
|
||||
|
||||
.globl _start
|
||||
_start:
|
||||
lui a0, %hi(GPIO_BASE)
|
||||
addi a0, a0, %lo(GPIO_BASE)
|
||||
addi t0, zero, 0
|
||||
li t1, DELAY
|
||||
.lp1:
|
||||
sb t0, 0(a0)
|
||||
addi t0, t0, 1
|
||||
and t2, zero, zero
|
||||
time1:
|
||||
addi t2, t2, 1
|
||||
bne t1, t2, time1
|
||||
j .lp1
|
||||
Reference in New Issue
Block a user