I would like to make a suggestion here, too.
I would organize the whole section from parameters to returns (See image) like the example shown below:
Parameter name | Parameter type | Description | Optional |
---|---|---|---|
pin | int | The number of the pin on which you want to read the pulse. | |
value | int | type of pulse to read: either HIGH or LOW. | |
timeout | unsigned long | the number of microseconds to wait for the pulse to start; default is one second |
Return type | Description |
---|---|
unsigned long | the length of the pulse (in microseconds) or 0 if no pulse started before the timeout () |
For the Syntax section I personally would use the suggestion from @dkovari, like
pulseIn(int pin, int value)
pulseIn(int pin, int value, unsigned long timeout)
Gist for example is here: https://gist.github.com/SeppPenner/2df12e8f7fb058a3651913839998d468