FreeCalypso > hg > freecalypso-tools
annotate target-utils/libbase/waitarm.S @ 467:dc2fd8e6f42c
uptools/atcmd: null pointer passing fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Feb 2019 22:17:46 +0000 |
parents | 6228d27738d1 |
children | 06ad5e30e8d0 |
rev | line source |
---|---|
453
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This assembly module provides a wait_ARM_cycles() function just like |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * in TI's firmware; it is meant to gradually replace and phase out |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * osmo_delay_ms(). One loop count for this function equals 5 ARM clock |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * cycles when running out of IRAM. |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 */ |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 .text |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 .code 32 |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 .globl wait_ARM_cycles |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 wait_ARM_cycles: |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 cmp r0, #0 |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 bxeq lr |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 1: sub r0, r0, #1 |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 cmp r0, #0 |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 bne 1b |
6228d27738d1
target-utils: wait_ARM_cycles() added to libbase
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 bx lr |