Updated Hardware API (markdown)

master
Daniel Campora 2015-09-28 10:40:41 +02:00
rodzic 7e7ed54d9a
commit 8a766f7527
1 zmienionych plików z 9 dodań i 7 usunięć

@ -343,10 +343,10 @@ Methods:
- `wlan.deinit()` disable the NIC. NOHEAP.
- `wlan.mode([mode])` set or get the mode. NOHEAP
- `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.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.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
@ -359,9 +359,10 @@ Constants:
- `WLAN.AP` Access point mode
- `WLAN.AP+STA` Access point + Station mode (sometimes called SoftAP)
- `WLAN.P2P` Peer to peer (also called WiFi-direct or Ad-Hoc mode)
- `WLAN.WEP` WEP authentication
- `WLAN.WPA` WPA authentication
- `WLAN.WPA2` WPA2 authentication
- `WLAN.WEP` WEP security
- `WLAN.WPA` WPA security
- `WLAN.WPA2` WPA2 security
- `WLAN.WPA_ENT` WPA Enterprise security
# machine module
@ -373,11 +374,12 @@ Constants:
- `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.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
To specify from which sleep mode a callback can wake the machine:
- `machine.IDLE`
- `machine.SLEEP`
- `machine.DEEPSLEEP`
@ -391,7 +393,7 @@ Reset causes:
Wake reason:
- `machine.NETWORK_WAKE`
- `machine.PIN_WAKE`
- `machine.TIMER_WAKE`
- `machine.RTC_WAKE`
# time module additions