pulseInASM: rework comment style

This commit is contained in:
Martino Facchin 2015-03-02 13:46:22 +01:00
parent 8dfa9dfb9e
commit 9e7c7c4ddc
1 changed files with 28 additions and 26 deletions

View File

@ -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>