mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
pulseInASM: rework comment style
This commit is contained in:
parent
d4a80be045
commit
689c654e8d
@ -20,32 +20,34 @@
|
|||||||
Boston, MA 02111-1307 USA
|
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
|
* The following routine was generated by avr-gcc 4.8.3 with the following parameters
|
||||||
# on the original C function
|
* -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 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
|
* unsigned long width = 0;
|
||||||
# while ((*port & bit) == stateMask)
|
* // wait for any previous pulse to end
|
||||||
# if (--maxloops == 0)
|
* while ((*port & bit) == stateMask)
|
||||||
# return 0;
|
* if (--maxloops == 0)
|
||||||
#
|
* return 0;
|
||||||
# // wait for the pulse to start
|
*
|
||||||
# while ((*port & bit) != stateMask)
|
* // wait for the pulse to start
|
||||||
# if (--maxloops == 0)
|
* while ((*port & bit) != stateMask)
|
||||||
# return 0;
|
* if (--maxloops == 0)
|
||||||
#
|
* return 0;
|
||||||
# // wait for the pulse to stop
|
*
|
||||||
# while ((*port & bit) == stateMask) {
|
* // wait for the pulse to stop
|
||||||
# if (++width == maxloops)
|
* while ((*port & bit) == stateMask) {
|
||||||
# return 0;
|
* if (++width == maxloops)
|
||||||
# }
|
* return 0;
|
||||||
# return width;
|
* }
|
||||||
# }
|
* return width;
|
||||||
#
|
* }
|
||||||
# some compiler outputs were removed but the rest of the code is untouched
|
*
|
||||||
|
* some compiler outputs were removed but the rest of the code is untouched
|
||||||
|
*/
|
||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user