Bring our own chainloader for *hax
This commit is contained in:
18
haxloader/source/fatfs/sdmmc/delay.s
Normal file
18
haxloader/source/fatfs/sdmmc/delay.s
Normal file
@@ -0,0 +1,18 @@
|
||||
.text
|
||||
.arm
|
||||
.align 4
|
||||
|
||||
.global waitcycles
|
||||
.type waitcycles, %function
|
||||
|
||||
@waitcycles ( u32 us )
|
||||
waitcycles:
|
||||
PUSH {R0-R2,LR}
|
||||
STR R0, [SP,#4]
|
||||
waitcycles_loop:
|
||||
LDR R3, [SP,#4]
|
||||
SUBS R2, R3, #1
|
||||
STR R2, [SP,#4]
|
||||
CMP R3, #0
|
||||
BNE waitcycles_loop
|
||||
POP {R0-R2,PC}
|
||||
Reference in New Issue
Block a user