From 9e7c7c4ddc9919ad21c95397cdf4900ba25fa090 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 2 Mar 2015 13:46:22 +0100 Subject: pulseInASM: rework comment style --- cores/arduino/wiring_pulse.S | 54 +++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/cores/arduino/wiring_pulse.S b/cores/arduino/wiring_pulse.S index ffd70f5..1dd22e6 100644 --- a/cores/arduino/wiring_pulse.S +++ b/cores/arduino/wiring_pulse.S @@ -20,32 +20,34 @@ Boston, MA 02111-1307 USA */ -# The following routine was generated by avr-gcc 4.8.3 with the following parameters -# -gstabs -Wa,-ahlmsd=output.lst -dp -fverbose-asm -O2 -# on the original C function -# -# unsigned long pulseInSimpl(volatile uint8_t *port, uint8_t bit, uint8_t stateMask, unsigned long maxloops) -# { -# unsigned long width = 0; -# // wait for any previous pulse to end -# while ((*port & bit) == stateMask) -# if (--maxloops == 0) -# return 0; -# -# // wait for the pulse to start -# while ((*port & bit) != stateMask) -# if (--maxloops == 0) -# return 0; -# -# // wait for the pulse to stop -# while ((*port & bit) == stateMask) { -# if (++width == maxloops) -# return 0; -# } -# return width; -# } -# -# some compiler outputs were removed but the rest of the code is untouched +/* + * The following routine was generated by avr-gcc 4.8.3 with the following parameters + * -gstabs -Wa,-ahlmsd=output.lst -dp -fverbose-asm -O2 + * on the original C function + * + * unsigned long pulseInSimpl(volatile uint8_t *port, uint8_t bit, uint8_t stateMask, unsigned long maxloops) + * { + * unsigned long width = 0; + * // wait for any previous pulse to end + * while ((*port & bit) == stateMask) + * if (--maxloops == 0) + * return 0; + * + * // wait for the pulse to start + * while ((*port & bit) != stateMask) + * if (--maxloops == 0) + * return 0; + * + * // wait for the pulse to stop + * while ((*port & bit) == stateMask) { + * if (++width == maxloops) + * return 0; + * } + * return width; + * } + * + * some compiler outputs were removed but the rest of the code is untouched + */ #include -- cgit v1.2.3-18-g5258