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
Diff: OneWire_Masters/GPIO/owlink.s
- Revision:
- 40:590791ecac1c
- Parent:
- 31:7c684e49fa8f
- Child:
- 46:afe466c96069
--- a/OneWire_Masters/GPIO/owlink.s Tue Apr 05 18:43:39 2016 +0000 +++ b/OneWire_Masters/GPIO/owlink.s Tue Apr 05 17:28:35 2016 -0500 @@ -1,4 +1,4 @@ -#define PROC_CLOCK_MHZ 24 // Processor clock in MHz +#define PROC_CLOCK_MHZ (__SYSTEM_HFX / 1000000) // Processor clock in MHz #define OVERHEAD_TUNING 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 @@ -25,6 +25,8 @@ EXPORT ow_usdelay ow_usdelay #endif + cmp R0, #0 // Return if time_us equals zero + beq return mov R1, #LOOPS_PER_US mul R0, R0, R1 sub R0, R0, #LOOPS_REMOVED_TUNING @@ -35,10 +37,15 @@ #endif subs R0, R0, #1 bne loop +#ifdef TOOLCHAIN_GCC_ARM +return: +#else // TOOLCHAIN_IAR or TOOLCHAIN_ARM_STD +return +#endif bx R14 #ifdef TOOLCHAIN_GCC_ARM .end #else // TOOLCHAIN_IAR or TOOLCHAIN_ARM_STD END -#endif \ No newline at end of file +#endif