Skip to content

Commit 7a4fa14

Browse files
authored
Merge pull request arduino#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

Language/Functions/Bits and Bytes/bitRead.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ Reads a bit of a number.
2828

2929
[float]
3030
=== Parameters
31-
`x`: the number from which to read
32-
33-
`n`: which bit to read, starting at 0 for the least-significant (rightmost) bit
31+
`x`: the number from which to read. +
32+
`n`: which bit to read, starting at 0 for the least-significant (rightmost) bit.
3433

3534

3635
[float]
3736
=== Returns
38-
the value of the bit (0 or 1).
37+
The value of the bit (0 or 1).
3938

4039
--
4140
// OVERVIEW SECTION ENDS

Language/Functions/Bits and Bytes/bitSet.adoc

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

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

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

3535
[float]
3636
=== Returns

Language/Functions/Bits and Bytes/bitWrite.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ Writes a bit of a numeric variable.
2828

2929
[float]
3030
=== Parameters
31-
`x`: the numeric variable to which to write
31+
`x`: the numeric variable to which to write. +
32+
`n`: which bit of the number to write, starting at 0 for the least-significant (rightmost) bit. +
33+
`b`: the value to write to the bit (0 or 1).
3234

33-
`n`: which bit of the number to write, starting at 0 for the least-significant (rightmost) bit
34-
35-
`b`: the value to write to the bit (0 or 1)
3635

3736
[float]
3837
=== Returns

Language/Functions/Bits and Bytes/highByte.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ Extracts the high-order (leftmost) byte of a word (or the second lowest byte of
3030
=== Parameters
3131
`x`: a value of any type
3232

33+
3334
[float]
3435
=== Returns
35-
byte
36+
Data type: `byte`.
3637

3738
--
3839
// OVERVIEW SECTION ENDS

Language/Functions/Bits and Bytes/lowByte.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ Extracts the low-order (rightmost) byte of a variable (e.g. a word).
3030
=== Parameters
3131
`x`: a value of any type
3232

33+
3334
[float]
3435
=== Returns
35-
byte
36+
Data type: `byte`.
37+
3638
--
3739
// OVERVIEW SECTION ENDS
3840

Language/Functions/Characters/isAlpha.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ Analyse if a char is alpha (that is a letter). Returns true if thisChar contains
2323

2424
[float]
2525
=== Syntax
26-
[source,arduino]
27-
----
28-
isAlpha(thisChar)
29-
----
26+
`isAlpha(thisChar)`
27+
3028

3129
[float]
3230
=== Parameters
33-
`thisChar`: variable. *Allowed data types:* char
31+
`thisChar`: variable. Allowed data types: `char`.
32+
3433

3534
[float]
3635
=== Returns

Language/Functions/Characters/isAlphaNumeric.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ Analyse if a char is alphanumeric (that is a letter or a numbers). Returns true
2323

2424
[float]
2525
=== Syntax
26-
[source,arduino]
27-
----
28-
isAlphaNumeric(thisChar)
29-
----
26+
`isAlphaNumeric(thisChar)`
27+
3028

3129
[float]
3230
=== Parameters
33-
`thisChar`: variable. *Allowed data types:* char
31+
`thisChar`: variable. Allowed data types: `char`.
32+
3433

3534
[float]
3635
=== Returns

Language/Functions/Characters/isAscii.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ Analyse if a char is Ascii. Returns true if thisChar contains an Ascii character
2323

2424
[float]
2525
=== Syntax
26-
[source,arduino]
27-
----
28-
isAscii(thisChar)
29-
----
26+
`isAscii(thisChar)`
27+
3028

3129
[float]
3230
=== Parameters
33-
`thisChar`: variable. *Allowed data types:* char
31+
`thisChar`: variable. Allowed data types: `char`.
32+
3433

3534
[float]
3635
=== Returns

Language/Functions/Characters/isControl.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ Analyse if a char is a control character. Returns true if thisChar is a control
2323

2424
[float]
2525
=== Syntax
26-
[source,arduino]
27-
----
28-
isControl(thisChar)
29-
----
26+
`isControl(thisChar)`
27+
3028

3129
[float]
3230
=== Parameters
33-
`thisChar`: variable. *Allowed data types:* char
31+
`thisChar`: variable. Allowed data types: `char`.
32+
3433

3534
[float]
3635
=== Returns

Language/Functions/Characters/isDigit.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ Analyse if a char is a digit (that is a number). Returns true if thisChar is a n
2323

2424
[float]
2525
=== Syntax
26-
[source,arduino]
27-
----
28-
isDigit(thisChar)
29-
----
26+
`isDigit(thisChar)`
27+
3028

3129
[float]
3230
=== Parameters
33-
`thisChar`: variable. *Allowed data types:* char
31+
`thisChar`: variable. Allowed data types: `char`.
32+
3433

3534
[float]
3635
=== Returns

Language/Functions/Characters/isGraph.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ Analyse if a char is printable with some content (space is printable but has no
2323

2424
[float]
2525
=== Syntax
26-
[source,arduino]
27-
----
28-
isGraph(thisChar)
29-
----
26+
`isGraph(thisChar)`
3027

3128
[float]
3229
=== Parameters
33-
`thisChar`: variable. *Allowed data types:* char
30+
`thisChar`: variable. Allowed data types: `char`.
31+
3432

3533
[float]
3634
=== Returns

Language/Functions/Characters/isHexadecimalDigit.adoc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@ Analyse if a char is an hexadecimal digit (A-F, 0-9). Returns true if thisChar c
2323

2424
[float]
2525
=== Syntax
26-
[source,arduino]
27-
----
26+
`isHexadecimalDigit(thisChar)`
2827

29-
isHexadecimalDigit(thisChar)
30-
31-
----
3228

3329
[float]
3430
=== Parameters
35-
`thisChar`: variable. *Allowed data types:* char
31+
`thisChar`: variable. Allowed data types: `char`.
32+
3633

3734
[float]
3835
=== Returns

0 commit comments

Comments
 (0)