Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MAXREFDES131_Qt_Demo MAX32630FTHR_iButton_uSD_Logger MAX32630FTHR_DS18B20_uSD_Logger MAXREFDES130_131_Demo ... more
OneWire_Masters/GPIO/owlink.asm
- Committer:
- IanBenzMaxim
- Date:
- 2016-03-29
- Revision:
- 28:057bb14d3cee
File content as of revision 28:057bb14d3cee:
PROC_CLOCK_MHZ EQU 24 ; Processor clock in MHz OVERHEAD_TUNING EQU 21 ; Fraction where OverheadTime(us) = OVERHEAD_TUNING / PROC_CLOCK_MHZ ; Make PROC_CLOCK_MHZ and OVERHEAD_TUNING divisible by PROC_CYCLES_PER_LOOP for best results PIPELINE_REFILL_PROC_CYCLES EQU 1 ; ARM specifies 1-3 cycles for pipeline refill following a branch PROC_CYCLES_PER_LOOP EQU (2 + PIPELINE_REFILL_PROC_CYCLES) LOOPS_PER_US EQU (PROC_CLOCK_MHZ / PROC_CYCLES_PER_LOOP) ; Number of loop passes for a 1 us delay LOOPS_REMOVED_TUNING EQU (OVERHEAD_TUNING / PROC_CYCLES_PER_LOOP) SECTION owlink : CODE ; void ow_usdelay(unsigned int time_us) PUBLIC ow_usdelay ow_usdelay: mov R1, #LOOPS_PER_US mul R0, R0, R1 sub R0, R0, #LOOPS_REMOVED_TUNING loop: subs R0, R0, #1 bne loop bx R14 END