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:
- 59:f35aa61c59dd
- Parent:
- 57:1635f247ceae
- Child:
- 63:422be898443a
diff -r 4446110ec3b8 -r f35aa61c59dd OneWire_Masters/GPIO/owlink.s --- a/OneWire_Masters/GPIO/owlink.s Wed Apr 13 18:54:02 2016 -0500 +++ b/OneWire_Masters/GPIO/owlink.s Thu Apr 14 13:30:52 2016 +0000 @@ -1,6 +1,6 @@ // ow_usdelay configuration #define PROC_CLOCK_MHZ (__SYSTEM_HFX / 1000000) // Processor clock in MHz -#define OVERHEAD_TUNING 21 // Fraction where OverheadTime(us) = OVERHEAD_TUNING / PROC_CLOCK_MHZ +#define OVERHEAD_TUNING 18 // 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 // ow_usdelay constants @@ -89,20 +89,20 @@ bx R14 // static void write_ow_gpio_low(unsigned int * portReg, unsigned int pinMask) - THUMB_FUNC -LABEL(write_ow_gpio_low) + MACRO_ARM_BEGIN +MACRO_BEGIN(write_ow_gpio_low) ldr R2, [R0] bic R2, R2, R1 str R2, [R0] - bx R14 + ENDM // static void write_ow_gpio_high(unsigned int * portReg, unsigned int pinMask) - THUMB_FUNC -LABEL(write_ow_gpio_high) + MACRO_ARM_BEGIN +MACRO_BEGIN(write_ow_gpio_high) ldr R2, [R0] orr R2, R2, R1 str R2, [R0] - bx R14 + ENDM // void ow_bit(uint8_t * sendrecvbit, volatile uint32_t * inPortReg, volatile uint32_t * outPortReg, unsigned int pinMask, const OwTiming * timing) THUMB_FUNC @@ -159,11 +159,11 @@ // R8: inPortReg // R14: Scratch mov R0, R7 // outPortReg - bl write_ow_gpio_low // Pull low + write_ow_gpio_low // Pull low mov R0, R6 // tLOW bl ow_usdelay // Delay for tLOW mov R0, R7 // outPortReg - bl write_ow_gpio_high // Release pin + write_ow_gpio_high // Release pin mov R0, R5 // delay2 bl ow_usdelay // Delay for sample time ldr R5, [R8] // Read *inPortReg @@ -184,14 +184,14 @@ // R8: inPortReg // R14: Scratch mov R0, R7 // outPortReg - bl write_ow_gpio_low // Pull low + write_ow_gpio_low // Pull low mov R0, R5 // tMSR bl ow_usdelay // Delay for tMSR ldr R5, [R8] // Read *inPortReg mov R0, R6 // delay2 bl ow_usdelay // Delay for release mov R0, R7 // outPortReg - bl write_ow_gpio_high // Release pin + write_ow_gpio_high // Release pin // endif (*sendrecvbit & 1) // R0: Scratch // R1: pinMask