diff options
author | Martino Facchin <m.facchin@arduino.cc> | 2015-03-02 13:46:22 +0100 |
---|---|---|
committer | Martino Facchin <m.facchin@arduino.cc> | 2015-05-29 15:01:38 +0200 |
commit | 9e7c7c4ddc9919ad21c95397cdf4900ba25fa090 (patch) | |
tree | d7b7660b58882a941407bbcfe898452b2ef052ec /cores/arduino | |
parent | 8dfa9dfb9e0900d748a4ea42524a5bf507111b69 (diff) |
pulseInASM: rework comment style
Diffstat (limited to 'cores/arduino')
-rw-r--r-- | cores/arduino/wiring_pulse.S | 54 |
1 files 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 <avr/io.h> |