ammendments to tmr API doc cleanup
This commit is contained in:
parent
a89b008087
commit
0a0c7c0637
|
@ -22,7 +22,7 @@ This is a convenience function combining [`tmr.register()`](#tmrregister) and [`
|
||||||
To free up the resources with this timer when done using it, call [`tmr.unregister()`](#tmrunregister) on it. For one-shot timers this is not necessary, unless they were stopped before they expired.
|
To free up the resources with this timer when done using it, call [`tmr.unregister()`](#tmrunregister) on it. For one-shot timers this is not necessary, unless they were stopped before they expired.
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
`tmr.register([id/ref], interval_ms, mode, func())`
|
`tmr.alarm([id/ref], interval_ms, mode, func())`
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `id`/`ref` timer id (0-6) or object, obsolete for OO API (→ [`tmr.create()`](#tmrcreate))
|
- `id`/`ref` timer id (0-6) or object, obsolete for OO API (→ [`tmr.create()`](#tmrcreate))
|
||||||
|
|
|
@ -70,7 +70,7 @@ tmr.create():alarm(1000, tmr.ALARM_AUTO, function(cb_timer)
|
||||||
print("WiFi connection established, IP address: " .. wifi.sta.getip())
|
print("WiFi connection established, IP address: " .. wifi.sta.getip())
|
||||||
print("You have 3 seconds to abort")
|
print("You have 3 seconds to abort")
|
||||||
print("Waiting...")
|
print("Waiting...")
|
||||||
tmr.alarm(0, 3000, 0, startup)
|
tmr.create():alarm(3000, tmr.ALARM_SINGLE, startup)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue