docs/library/network: Typo fixes, consistent acronym capitalization.
This commit is contained in:
parent
b9a88683a4
commit
c28f9df63a
@ -80,7 +80,7 @@ For example::
|
|||||||
class CC3K
|
class CC3K
|
||||||
==========
|
==========
|
||||||
|
|
||||||
This class provides a driver for CC3000 wifi modules. Example usage::
|
This class provides a driver for CC3000 WiFi modules. Example usage::
|
||||||
|
|
||||||
import network
|
import network
|
||||||
nic = network.CC3K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
|
nic = network.CC3K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
|
||||||
@ -129,16 +129,16 @@ For example::
|
|||||||
|
|
||||||
.. method:: cc3k.connect(ssid, key=None, \*, security=WPA2, bssid=None)
|
.. method:: cc3k.connect(ssid, key=None, \*, security=WPA2, bssid=None)
|
||||||
|
|
||||||
Connect to a wifi access point using the given SSID, and other security
|
Connect to a WiFi access point using the given SSID, and other security
|
||||||
parameters.
|
parameters.
|
||||||
|
|
||||||
.. method:: cc3k.disconnect()
|
.. method:: cc3k.disconnect()
|
||||||
|
|
||||||
Disconnect from the wifi access point.
|
Disconnect from the WiFi access point.
|
||||||
|
|
||||||
.. method:: cc3k.isconnected()
|
.. method:: cc3k.isconnected()
|
||||||
|
|
||||||
Returns True if connected to a wifi access point and has a valid IP address,
|
Returns True if connected to a WiFi access point and has a valid IP address,
|
||||||
False otherwise.
|
False otherwise.
|
||||||
|
|
||||||
.. method:: cc3k.ifconfig()
|
.. method:: cc3k.ifconfig()
|
||||||
@ -324,7 +324,7 @@ For example::
|
|||||||
|
|
||||||
.. method:: wlan.isconnected()
|
.. method:: wlan.isconnected()
|
||||||
|
|
||||||
In case of STA mode, returns ``True`` if connected to a wifi access
|
In case of STA mode, returns ``True`` if connected to a WiFi access
|
||||||
point and has a valid IP address. In AP mode returns ``True`` when a
|
point and has a valid IP address. In AP mode returns ``True`` when a
|
||||||
station is connected. Returns ``False`` otherwise.
|
station is connected. Returns ``False`` otherwise.
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ For example::
|
|||||||
|
|
||||||
# Set WiFi access point name (formally known as ESSID) and WiFi channel
|
# Set WiFi access point name (formally known as ESSID) and WiFi channel
|
||||||
ap.config(essid='My AP', channel=11)
|
ap.config(essid='My AP', channel=11)
|
||||||
# Queey params one by one
|
# Query params one by one
|
||||||
print(ap.config('essid'))
|
print(ap.config('essid'))
|
||||||
print(ap.config('channel'))
|
print(ap.config('channel'))
|
||||||
|
|
||||||
@ -434,7 +434,7 @@ For example::
|
|||||||
|
|
||||||
.. method:: wlan.connect(ssid, \*, auth=None, bssid=None, timeout=None)
|
.. method:: wlan.connect(ssid, \*, auth=None, bssid=None, timeout=None)
|
||||||
|
|
||||||
Connect to a wifi access point using the given SSID, and other security
|
Connect to a WiFi access point using the given SSID, and other security
|
||||||
parameters.
|
parameters.
|
||||||
|
|
||||||
- ``auth`` is a tuple with (sec, key). Security can be ``None``, ``WLAN.WEP``,
|
- ``auth`` is a tuple with (sec, key). Security can be ``None``, ``WLAN.WEP``,
|
||||||
@ -452,16 +452,16 @@ For example::
|
|||||||
|
|
||||||
.. method:: wlan.disconnect()
|
.. method:: wlan.disconnect()
|
||||||
|
|
||||||
Disconnect from the wifi access point.
|
Disconnect from the WiFi access point.
|
||||||
|
|
||||||
.. method:: wlan.isconnected()
|
.. method:: wlan.isconnected()
|
||||||
|
|
||||||
In case of STA mode, returns ``True`` if connected to a wifi access point and has a valid IP address.
|
In case of STA mode, returns ``True`` if connected to a WiFi access point and has a valid IP address.
|
||||||
In AP mode returns ``True`` when a station is connected, ``False`` otherwise.
|
In AP mode returns ``True`` when a station is connected, ``False`` otherwise.
|
||||||
|
|
||||||
.. method:: wlan.ifconfig(if_id=0, config=['dhcp' or configtuple])
|
.. method:: wlan.ifconfig(if_id=0, config=['dhcp' or configtuple])
|
||||||
|
|
||||||
With no parameters given eturns a 4-tuple of ``(ip, subnet_mask, gateway, DNS_server)``.
|
With no parameters given returns a 4-tuple of ``(ip, subnet_mask, gateway, DNS_server)``.
|
||||||
|
|
||||||
if ``'dhcp'`` is passed as a parameter then the DHCP client is enabled and the IP params
|
if ``'dhcp'`` is passed as a parameter then the DHCP client is enabled and the IP params
|
||||||
are negotiated with the AP.
|
are negotiated with the AP.
|
||||||
@ -499,10 +499,10 @@ For example::
|
|||||||
Create a callback to be triggered when a WLAN event occurs during ``machine.SLEEP``
|
Create a callback to be triggered when a WLAN event occurs during ``machine.SLEEP``
|
||||||
mode. Events are triggered by socket activity or by WLAN connection/disconnection.
|
mode. Events are triggered by socket activity or by WLAN connection/disconnection.
|
||||||
|
|
||||||
- ``handler`` is the function that gets called when the irq is triggered.
|
- ``handler`` is the function that gets called when the IRQ is triggered.
|
||||||
- ``wake`` must be ``machine.SLEEP``.
|
- ``wake`` must be ``machine.SLEEP``.
|
||||||
|
|
||||||
Returns an irq object.
|
Returns an IRQ object.
|
||||||
|
|
||||||
Constants
|
Constants
|
||||||
---------
|
---------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user