Updated Hardware API (markdown)
parent
7e7ed54d9a
commit
8a766f7527
|
@ -343,10 +343,10 @@ Methods:
|
||||||
- `wlan.deinit()` disable the NIC. NOHEAP.
|
- `wlan.deinit()` disable the NIC. NOHEAP.
|
||||||
- `wlan.mode([mode])` set or get the mode. NOHEAP
|
- `wlan.mode([mode])` set or get the mode. NOHEAP
|
||||||
- `wlan.ssid([ssid])` set or get our own SSID name
|
- `wlan.ssid([ssid])` set or get our own SSID name
|
||||||
- `wlan.auth([(type, key)])` set or get the security configuration tuple
|
- `wlan.auth([(sec, key)])` set or get the authentication tuple.
|
||||||
- `wlan.channel([channel])` set or get the channel. NOHEAP
|
- `wlan.channel([channel])` set or get the channel. NOHEAP
|
||||||
- `wlan.scan()` perform a network scan and return a named tuple of the form:
|
- `wlan.scan()` perform a network scan and return a named tuple of the form:
|
||||||
`(ssid, bssid, auth, channel, rssi)`
|
`(ssid, bssid, sec, channel, rssi)`
|
||||||
- `wlan.mac([mac])` get or set the MAC address. The MAC address is a `bytes` object of length 6.
|
- `wlan.mac([mac])` get or set the MAC address. The MAC address is a `bytes` object of length 6.
|
||||||
- `wlan.connect(ssid, auth=None, *, bssid, timeout=None)` Connect to the network specified by the SSID using the given authentication. Optionally specify the BSSID and a timeout.
|
- `wlan.connect(ssid, auth=None, *, bssid, timeout=None)` Connect to the network specified by the SSID using the given authentication. Optionally specify the BSSID and a timeout.
|
||||||
- `wlan.disconnect()` Closes the current connection. NOHEAP
|
- `wlan.disconnect()` Closes the current connection. NOHEAP
|
||||||
|
@ -359,9 +359,10 @@ Constants:
|
||||||
- `WLAN.AP` Access point mode
|
- `WLAN.AP` Access point mode
|
||||||
- `WLAN.AP+STA` Access point + Station mode (sometimes called SoftAP)
|
- `WLAN.AP+STA` Access point + Station mode (sometimes called SoftAP)
|
||||||
- `WLAN.P2P` Peer to peer (also called WiFi-direct or Ad-Hoc mode)
|
- `WLAN.P2P` Peer to peer (also called WiFi-direct or Ad-Hoc mode)
|
||||||
- `WLAN.WEP` WEP authentication
|
- `WLAN.WEP` WEP security
|
||||||
- `WLAN.WPA` WPA authentication
|
- `WLAN.WPA` WPA security
|
||||||
- `WLAN.WPA2` WPA2 authentication
|
- `WLAN.WPA2` WPA2 security
|
||||||
|
- `WLAN.WPA_ENT` WPA Enterprise security
|
||||||
|
|
||||||
# machine module
|
# machine module
|
||||||
|
|
||||||
|
@ -373,11 +374,12 @@ Constants:
|
||||||
- `machine.sleep([... options])` NOHEAP; enter sleep mode that retains RAM and continues execution when woken
|
- `machine.sleep([... options])` NOHEAP; enter sleep mode that retains RAM and continues execution when woken
|
||||||
- `machine.deepsleep([... options])` NOHEAP; enter sleep mode that may not retain RAM and may reset when woken
|
- `machine.deepsleep([... options])` NOHEAP; enter sleep mode that may not retain RAM and may reset when woken
|
||||||
- `machine.reset_cause()` get the reset cause
|
- `machine.reset_cause()` get the reset cause
|
||||||
- `machine.wake_reason()` get the wake reason, will return `None` if now sleep-wake cycle has occurred
|
- `machine.wake_reason()` get the wake reason (from `SLEEP` or `DEEPSLEEP` modes), will return `None` if no sleep-wake cycle has occurred
|
||||||
|
|
||||||
### Constants
|
### Constants
|
||||||
|
|
||||||
To specify from which sleep mode a callback can wake the machine:
|
To specify from which sleep mode a callback can wake the machine:
|
||||||
|
- `machine.IDLE`
|
||||||
- `machine.SLEEP`
|
- `machine.SLEEP`
|
||||||
- `machine.DEEPSLEEP`
|
- `machine.DEEPSLEEP`
|
||||||
|
|
||||||
|
@ -391,7 +393,7 @@ Reset causes:
|
||||||
Wake reason:
|
Wake reason:
|
||||||
- `machine.NETWORK_WAKE`
|
- `machine.NETWORK_WAKE`
|
||||||
- `machine.PIN_WAKE`
|
- `machine.PIN_WAKE`
|
||||||
- `machine.TIMER_WAKE`
|
- `machine.RTC_WAKE`
|
||||||
|
|
||||||
# time module additions
|
# time module additions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue