Skip to content

Commit 7a4fa14

Browse files
authored
Merge pull request #559 from per1234/standard-syntax-parameters-returns-formatting
Use standard format for Syntax, Parameters, and Returns sections
2 parents 192ce1d + a5b437a commit 7a4fa14

File tree

191 files changed

+701
-700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+701
-700
lines changed

Language/Functions/Advanced IO/pulseIn.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ The timing of this function has been determined empirically and will probably sh
2525

2626
[float]
2727
=== Syntax
28-
`pulseIn(pin, value)`
29-
28+
`pulseIn(pin, value)` +
3029
`pulseIn(pin, value, timeout)`
3130

31+
3232
[float]
3333
=== Parameters
34-
`pin`: the number of the pin on which you want to read the pulse. (int)
34+
`pin`: the number of the pin on which you want to read the pulse. Allowed data types: `int`. +
35+
`value`: type of pulse to read: either link:../../../variables/constants/constants/[HIGH] or link:../../../variables/constants/constants/[LOW]. Allowed data types: `int`. +
36+
`timeout` (optional): the number of microseconds to wait for the pulse to start; default is one second. Allowed data types: `unsigned long`.
3537

36-
`value`: type of pulse to read: either link:../../../variables/constants/constants/[HIGH] or link:../../../variables/constants/constants/[LOW]. (int)
3738

38-
`timeout` (optional): the number of microseconds to wait for the pulse to start; default is one second (unsigned long)
3939
[float]
4040
=== Returns
41-
the length of the pulse (in microseconds) or 0 if no pulse started before the timeout (unsigned long)
41+
The length of the pulse (in microseconds) or 0 if no pulse started before the timeout. Data type: `unsigned long`.
4242

4343
--
4444
// OVERVIEW SECTION ENDS

Language/Functions/Advanced IO/pulseInLong.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ The timing of this function has been determined empirically and will probably sh
2727

2828
[float]
2929
=== Syntax
30-
`pulseInLong(pin, value)`
31-
30+
`pulseInLong(pin, value)` +
3231
`pulseInLong(pin, value, timeout)`
3332

33+
3434
[float]
3535
=== Parameters
36-
`pin`: the number of the pin on which you want to read the pulse. (int)
36+
`pin`: the number of the pin on which you want to read the pulse. Allowed data types: `int`. +
37+
`value`: type of pulse to read: either link:../../../variables/constants/constants/[HIGH] or link:../../../variables/constants/constants/[LOW]. Allowed data types: `int`. +
38+
`timeout` (optional): the number of microseconds to wait for the pulse to start; default is one second. Allowed data types: `unsigned long`.
3739

38-
`value`: type of pulse to read: either link:../../../variables/constants/constants/[HIGH] or link:../../../variables/constants/constants/[LOW]. (int)
3940

40-
`timeout` (optional): the number of microseconds to wait for the pulse to start; default is one second (unsigned long)
4141
[float]
4242
=== Returns
43-
the length of the pulse (in microseconds) or 0 if no pulse started before the timeout (unsigned long)
43+
The length of the pulse (in microseconds) or 0 if no pulse started before the timeout. Data type: `unsigned long`.
4444

4545
--
4646
// OVERVIEW SECTION ENDS

Language/Functions/Advanced IO/shiftIn.adoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ Note: this is a software implementation; Arduino also provides an link:https://w
3232

3333
[float]
3434
=== Parameters
35-
`dataPin`: the pin on which to input each bit (int)
35+
`dataPin`: the pin on which to input each bit. Allowed data types: `int`. +
36+
`clockPin`: the pin to toggle to signal a read from *dataPin*. +
37+
`bitOrder`: which order to shift in the bits; either *MSBFIRST* or *LSBFIRST*. (Most Significant Bit First, or, Least Significant Bit First).
3638

37-
`clockPin`: the pin to toggle to signal a read from *dataPin*
38-
39-
`bitOrder`: which order to shift in the bits; either *MSBFIRST* or *LSBFIRST*.
40-
(Most Significant Bit First, or, Least Significant Bit First)
4139

4240
[float]
4341
=== Returns
44-
the value read (byte)
42+
The value read. Data type: `byte`.
4543

4644
--
4745
// OVERVIEW SECTION ENDS

Language/Functions/Advanced IO/shiftOut.adoc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@ This is a software implementation; see also the https://www.arduino.cc/en/Refere
2828

2929
[float]
3030
=== Parameters
31-
`dataPin`: the pin on which to output each bit (int)
31+
`dataPin`: the pin on which to output each bit. Allowed data types: `int`. +
32+
`clockPin`: the pin to toggle once the dataPin has been set to the correct value. Allowed data types: `int`. +
33+
`bitOrder`: which order to shift out the bits; either MSBFIRST or LSBFIRST. (Most Significant Bit First, or, Least Significant Bit First). +
34+
`value`: the data to shift out. Allowed data types: `byte`.
3235

33-
`clockPin`: the pin to toggle once the dataPin has been set to the correct value (int)
34-
35-
`bitOrder`: which order to shift out the bits; either MSBFIRST or LSBFIRST.
36-
(Most Significant Bit First, or, Least Significant Bit First)
37-
38-
`value`: the data to shift out. (byte)
3936

4037
[float]
4138
=== Returns

Language/Functions/Advanced IO/tone.adoc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,16 @@ It is not possible to generate tones lower than 31Hz. For technical details, see
2929

3030
[float]
3131
=== Syntax
32-
`tone(pin, frequency)`
33-
32+
`tone(pin, frequency)` +
3433
`tone(pin, frequency, duration)`
35-
[%hardbreaks]
34+
3635

3736
[float]
3837
=== Parameters
39-
`pin`: the pin on which to generate the tone
38+
`pin`: the pin on which to generate the tone. +
39+
`frequency`: the frequency of the tone in hertz. Allowed data types: `unsigned int`. +
40+
`duration`: the duration of the tone in milliseconds (optional). Allowed data types: `unsigned long`.
4041

41-
`frequency`: the frequency of the tone in hertz - `unsigned int`
42-
43-
`duration`: the duration of the tone in milliseconds (optional) - `unsigned long`
44-
[%hardbreaks]
4542

4643
[float]
4744
=== Returns

Language/Functions/Analog IO/analogRead.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ On ATmega based boards (UNO, Nano, Mini, Mega), it takes about 100 microseconds
3838

3939
[float]
4040
=== Syntax
41-
4241
`analogRead(pin)`
4342

43+
4444
[float]
4545
=== Parameters
4646
`pin`: the name of the analog input pin to read from (A0 to A5 on most boards, A0 to A6 on MKR boards, A0 to A7 on the Mini and Nano, A0 to A15 on the Mega).
4747

48+
4849
[float]
4950
=== Returns
50-
51-
The analog reading on the pin (int). Although it is limited to the resolution of the analog to digital converter (0-1023 for 10 bits or 0-4095 for 12 bits).
51+
The analog reading on the pin. Although it is limited to the resolution of the analog to digital converter (0-1023 for 10 bits or 0-4095 for 12 bits). Data type: `int`.
5252

5353
--
5454
// OVERVIEW SECTION ENDS

Language/Functions/Analog IO/analogReference.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Arduino SAM Boards (Due)
5252
=== Parameters
5353
`type`: which type of reference to use (see list of options in the description).
5454

55+
5556
[float]
5657
=== Returns
5758
Nothing

Language/Functions/Analog IO/analogWrite.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ The `analogWrite` function has nothing to do with the analog pins or the `analog
3333

3434
[float]
3535
=== Parameters
36-
`pin`: the pin to write to. Allowed data types: int. +
37-
`value`: the duty cycle: between 0 (always off) and 255 (always on). Allowed data types: int
36+
`pin`: the pin to write to. Allowed data types: `int`. +
37+
`value`: the duty cycle: between 0 (always off) and 255 (always on). Allowed data types: `int`.
3838

3939

4040
[float]

Language/Functions/Bits and Bytes/bit.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Computes the value of the specified bit (bit 0 is 1, bit 1 is 2, bit 2 is 4, etc
3030
=== Parameters
3131
`n`: the bit whose value to compute
3232

33+
3334
[float]
3435
=== Returns
3536
The value of the bit.

Language/Functions/Bits and Bytes/bitClear.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Clears (writes a 0 to) a bit of a numeric variable.
2828

2929
[float]
3030
=== Parameters
31-
`x`: the numeric variable whose bit to clear
31+
`x`: the numeric variable whose bit to clear. +
32+
`n`: which bit to clear, starting at 0 for the least-significant (rightmost) bit.
3233

33-
`n`: which bit to clear, starting at 0 for the least-significant (rightmost) bit
3434

3535
[float]
3636
=== Returns

0 commit comments

Comments
 (0)