Skip to content

Commit af1b15b

Browse files
README.md: Consistently indicate functions with parentheses
1 parent d60e21f commit af1b15b

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $ ant dist
3333

3434
#### Basic Wiring functions ####
3535

36-
```pinMode```, ```digitalRead```, ```digitalWrite```, ```analogWrite``` work as usual.
36+
```pinMode()```, ```digitalRead()```, ```digitalWrite()```, ```analogWrite()``` work as usual.
3737

3838
Pin numbers correspond directly to the esp8266 GPIO pin numbers. To read GPIO2,
3939
call ```digitalRead(2)```
@@ -46,7 +46,7 @@ GPIO16 can be ```INPUT```, ```OUTPUT``` or ```INPUT_PULLDOWN```.
4646
```analogWrite(pin, value)``` enables software PWM on the given pin. PWM may be used on pins 0 to 15.
4747
Call ```analogWrite(pin, 0)``` to disable PWM on the pin. ```value``` may be in range from 0 to ```PWMRANGE```, which is currently equal to 1023.
4848

49-
Pin interrupts are supported through ```attachInterrupt```, ```detachInterrupt``` functions.
49+
Pin interrupts are supported through ```attachInterrupt()``` and ```detachInterrupt()``` functions.
5050
Interrupts may be attached to any GPIO pin, except GPIO16. Standard Arduino interrupt
5151
types are supported: ```CHANGE```, ```RISING```, ```FALLING```.
5252

@@ -57,31 +57,31 @@ The most usable pin functions are mapped to the macro ```SPECIAL```, so calling
5757
will switch that pin in the most usable FUNCTION_X. Those are UART RX/TX on pins 1 - 3, HSPI for pins 12-15 and CLK functions for pins 0, 4 and 5.
5858

5959
#### Timing and delays ####
60-
```millis``` and ```micros``` return the number of milliseconds and microseconds elapsed after reset, respectively.
60+
```millis()``` and ```micros()``` return the number of milliseconds and microseconds elapsed after reset, respectively.
6161

62-
```delay``` pauses the sketch for a given number of milliseconds and allows WiFi and TCP/IP tasks to run.
63-
```delayMicroseconds``` pauses for a given number of microseconds.
62+
```delay()``` pauses the sketch for a given number of milliseconds and allows WiFi and TCP/IP tasks to run.
63+
```delayMicroseconds()``` pauses for a given number of microseconds.
6464

6565
Remember that there is a lot of code that needs to run on the chip besides the sketch
6666
when WiFi is connected. WiFi and TCP/IP libraries get a chance to handle any pending
67-
events each time the ```loop()``` function completes, OR when ```delay(...)``` is called.
67+
events each time the ```loop()``` function completes, OR when ```delay()``` is called.
6868
If you have a loop somewhere in your sketch that takes a lot of time (>50ms) without
6969
calling ```delay()```, you might consider adding a call to delay function to keep the WiFi
7070
stack running smoothly.
7171

72-
There is also a ```yield()``` function which is equivalent to ```delay(0)```. The delayMicroseconds
72+
There is also a ```yield()``` function which is equivalent to ```delay(0)```. The ```delayMicroseconds()```
7373
function, on the other hand, does not yield to other tasks, so using it for delays
7474
more than 20 milliseconds is not recommended.
7575

7676
#### Serial ####
7777

7878
```Serial``` object works much the same way as on a regular Arduino. Apart from hardware FIFO (128 bytes for TX and RX) HardwareSerial has additional 256-byte TX and RX buffers. Both transmit and receive is interrupt-driven. Write and read functions only block the sketch execution when the respective FIFO/buffers are full/empty.
7979

80-
```Serial``` uses UART0, which is mapped to pins GPIO1 (TX) and GPIO3 (RX). Serial may be remapped to GPIO15 (TX) and GPIO13 (RX) by calling ```Serial.swap()``` after ```Serial.begin()```. Calling ```swap``` again maps UART0 back to GPIO1 and GPIO3.
80+
```Serial``` uses UART0, which is mapped to pins GPIO1 (TX) and GPIO3 (RX). Serial may be remapped to GPIO15 (TX) and GPIO13 (RX) by calling ```Serial.swap()``` after ```Serial.begin()```. Calling ```Serial.swap()``` again maps UART0 back to GPIO1 and GPIO3.
8181

82-
```Serial1``` uses UART1 which is a transmit-only UART. UART1 TX pin is GPIO2. To use ```Serial1```, call ```Serial1.begin```.
82+
```Serial1``` uses UART1 which is a transmit-only UART. UART1 TX pin is GPIO2. To use ```Serial1```, call ```Serial1.begin()```.
8383

84-
By default the diagnostic output from WiFi libraries is disabled when you call ```Serial.begin```. To enable debug output again, call ```Serial.setDebugOutput(true)```. To redirect debug output to ```Serial1``` instead, call ```Serial1.setDebugOutput(true)```.
84+
By default the diagnostic output from WiFi libraries is disabled when you call ```Serial.begin()```. To enable debug output again, call ```Serial.setDebugOutput(true)```. To redirect debug output to ```Serial1``` instead, call ```Serial1.setDebugOutput(true)```.
8585

8686
You also need to use ```Serial.setDebugOutput(true)``` to enable output from the Arduino ```printf()``` function.
8787

@@ -129,7 +129,7 @@ This is a bit different from standard EEPROM class. You need to call ```EEPROM.b
129129
before you start reading or writing, size being the number of bytes you want to use.
130130
Size can be anywhere between 4 and 4096 bytes.
131131

132-
```EEPROM.write``` does not write to flash immediately, instead you must call ```EEPROM.commit()```
132+
```EEPROM.write()``` does not write to flash immediately, instead you must call ```EEPROM.commit()```
133133
whenever you wish to save changes to flash. ```EEPROM.end()``` will also commit, and will
134134
release the RAM copy of EEPROM contents.
135135

@@ -153,7 +153,7 @@ Setting the Clock polarity (CPOL) is not supported, yet (SPI_MODE2 and SPI_MODE3
153153

154154
APIs related to deep sleep and watchdog timer are available in the ```ESP``` object, only available in Alpha version.
155155

156-
```ESP.deepSleep(microseconds, mode)``` will put the chip into deep sleep. ```mode``` is one of ```WAKE_RF_DEFAULT```, ```WAKE_RFCAL```, ```WAKE_NO_RFCAL```, ```WAKE_RF_DISABLED```. (GPIO16 needs to be tied to RST to wake from deepSleep.)
156+
```ESP.deepSleep(microseconds, mode)``` will put the chip into deep sleep. ```mode``` is one of ```WAKE_RF_DEFAULT```, ```WAKE_RFCAL```, ```WAKE_NO_RFCAL```, ```WAKE_RF_DISABLED```. (GPIO16 needs to be tied to RST to wake from ```ESP.deepSleep()```.)
157157

158158
```ESP.restart()``` restarts the CPU.
159159

@@ -173,14 +173,14 @@ Several APIs may be used to get flash chip info:
173173

174174
```ESP.getVcc()``` may be used to measure supply voltage. ESP needs to reconfigure the ADC
175175
at startup in order for this feature to be available. Add the following line to the top
176-
of your sketch to use ```getVcc```:
176+
of your sketch to use ```ESP.getVcc()```:
177177
```
178178
ADC_MODE(ADC_VCC);
179179
```
180180
TOUT pin has to be disconnected in this mode.
181181

182182
Note that by default ADC is configured to read from TOUT pin using ```analogRead(A0)```, and
183-
```ESP.getVCC()``` is not available.
183+
```ESP.getVcc()``` is not available.
184184

185185
#### OneWire (from https://www.pjrc.com/teensy/td_libs_OneWire.html) ####
186186

0 commit comments

Comments
 (0)