diff options
Diffstat (limited to 'docs/library')
-rw-r--r-- | docs/library/index.rst | 1 | ||||
-rw-r--r-- | docs/library/network.rst | 45 | ||||
-rw-r--r-- | docs/library/wipy.rst | 15 |
3 files changed, 57 insertions, 4 deletions
diff --git a/docs/library/index.rst b/docs/library/index.rst index b53a67ed1c..81a9824efd 100644 --- a/docs/library/index.rst +++ b/docs/library/index.rst @@ -105,6 +105,7 @@ it will fallback to loading the built-in ``ujson`` module. machine.rst network.rst + wipy.rst .. only:: port_esp8266 diff --git a/docs/library/network.rst b/docs/library/network.rst index cee65491c6..4485ff7e1b 100644 --- a/docs/library/network.rst +++ b/docs/library/network.rst @@ -27,6 +27,40 @@ For example:: data = s.recv(1000) s.close() +.. only:: port_wipy + + .. _network.server: + + class server + ============ + + Constructors + ------------ + + .. class:: server(id, ...) + + Create a server instance, see ``init`` for parameters of initialization. + + Methods + ------- + + .. method:: server.init(\*, login=('micro', 'python'), timeout=300) + + Init (and effectively start the server). Optionally a new ``user``, ``password`` + and ``timeout`` (in seconds) can be passed. + + .. method:: server.deinit() + + Stop the server + + .. method:: server.timeout([timeout_in_seconds]) + + Get or set the server timeout. + + .. method:: server.isrunning() + + Returns ``True`` is the server is running, ``False`` otherwise. + .. only:: port_pyboard class CC3K @@ -178,13 +212,13 @@ For example:: Dump the WIZnet5x00 registers. Useful for debugging. -class WLAN -========== - .. _network.WLAN: .. only:: port_esp8266 + class WLAN + ========== + This class provides a driver for WiFi network processor in the ESP8266. Example usage:: import network @@ -258,6 +292,9 @@ class WLAN .. only:: port_wipy + class WLAN + ========== + This class provides a driver for WiFi network processor in the WiPy. Example usage:: import network @@ -282,7 +319,7 @@ class WLAN Methods ------- - .. method:: init(mode, \*, ssid, security, key, channel, antenna) + .. method:: wlan.init(mode, \*, ssid, security, key, channel, antenna) Set or get the WiFi network processor configuration. diff --git a/docs/library/wipy.rst b/docs/library/wipy.rst new file mode 100644 index 0000000000..66aecd0530 --- /dev/null +++ b/docs/library/wipy.rst @@ -0,0 +1,15 @@ +:mod:`wipy` -- WiPy specific features +===================================== + +.. module:: wipy + :synopsis: WiPy specific features + +The ``wipy`` module contains functions to control specific features of the +WiPy, such as the heartbeat LED. + +Functions +--------- + +.. function:: heartbeat([enable]) + + Get or set the state (enabled or disabled) of the heartbeat LED. |