Skip to content

Commit a5bb597

Browse files
committed
pulseInASM: rework comment style
1 parent fa85de2 commit a5bb597

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

hardware/arduino/avr/cores/arduino/wiring_pulse.S

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,34 @@
2020
Boston, MA 02111-1307 USA
2121
*/
2222

23-
# The following routine was generated by avr-gcc 4.8.3 with the following parameters
24-
# -gstabs -Wa,-ahlmsd=output.lst -dp -fverbose-asm -O2
25-
# on the original C function
26-
#
27-
# unsigned long pulseInSimpl(volatile uint8_t *port, uint8_t bit, uint8_t stateMask, unsigned long maxloops)
28-
# {
29-
# unsigned long width = 0;
30-
# // wait for any previous pulse to end
31-
# while ((*port & bit) == stateMask)
32-
# if (--maxloops == 0)
33-
# return 0;
34-
#
35-
# // wait for the pulse to start
36-
# while ((*port & bit) != stateMask)
37-
# if (--maxloops == 0)
38-
# return 0;
39-
#
40-
# // wait for the pulse to stop
41-
# while ((*port & bit) == stateMask) {
42-
# if (++width == maxloops)
43-
# return 0;
44-
# }
45-
# return width;
46-
# }
47-
#
48-
# some compiler outputs were removed but the rest of the code is untouched
23+
/*
24+
* The following routine was generated by avr-gcc 4.8.3 with the following parameters
25+
* -gstabs -Wa,-ahlmsd=output.lst -dp -fverbose-asm -O2
26+
* on the original C function
27+
*
28+
* unsigned long pulseInSimpl(volatile uint8_t *port, uint8_t bit, uint8_t stateMask, unsigned long maxloops)
29+
* {
30+
* unsigned long width = 0;
31+
* // wait for any previous pulse to end
32+
* while ((*port & bit) == stateMask)
33+
* if (--maxloops == 0)
34+
* return 0;
35+
*
36+
* // wait for the pulse to start
37+
* while ((*port & bit) != stateMask)
38+
* if (--maxloops == 0)
39+
* return 0;
40+
*
41+
* // wait for the pulse to stop
42+
* while ((*port & bit) == stateMask) {
43+
* if (++width == maxloops)
44+
* return 0;
45+
* }
46+
* return width;
47+
* }
48+
*
49+
* some compiler outputs were removed but the rest of the code is untouched
50+
*/
4951

5052
#include <avr/io.h>
5153

0 commit comments

Comments
 (0)