aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
Diffstat (limited to 'cores/arduino')
-rw-r--r--cores/arduino/wiring_pulse.S54
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>