FreeCalypso > hg > freecalypso-tools
comparison target-utils/libbase/waitarm.S @ 453:6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 Feb 2019 07:35:07 +0000 |
parents | |
children | 06ad5e30e8d0 |
comparison
equal
deleted
inserted
replaced
452:688380565e0f | 453:6228d27738d1 |
---|---|
1 /* | |
2 * This assembly module provides a wait_ARM_cycles() function just like | |
3 * in TI's firmware; it is meant to gradually replace and phase out | |
4 * osmo_delay_ms(). One loop count for this function equals 5 ARM clock | |
5 * cycles when running out of IRAM. | |
6 */ | |
7 | |
8 .text | |
9 .code 32 | |
10 .globl wait_ARM_cycles | |
11 wait_ARM_cycles: | |
12 cmp r0, #0 | |
13 bxeq lr | |
14 1: sub r0, r0, #1 | |
15 cmp r0, #0 | |
16 bne 1b | |
17 bx lr |