summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/network.rst
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-10-31 01:37:19 +0000
committerDamien George <damien.p.george@gmail.com>2014-10-31 01:37:19 +0000
commit88d3054ac072f9c73b0f3f045c59ba74f6730c1d (patch)
tree6db7851068908c0640b1ed306d6823871fd3d742 /docs/library/network.rst
parent7c4445afe104631d5fe8e7401d50f40f205e35b9 (diff)
downloadmicropython-88d3054ac072f9c73b0f3f045c59ba74f6730c1d.tar.gz
micropython-88d3054ac072f9c73b0f3f045c59ba74f6730c1d.zip
docs: Import documentation from source-code inline comments.
The inline docs (prefixed with /// in .c files) have been converted to RST format and put in the docs subdirectory.
Diffstat (limited to 'docs/library/network.rst')
-rw-r--r--docs/library/network.rst63
1 files changed, 63 insertions, 0 deletions
diff --git a/docs/library/network.rst b/docs/library/network.rst
new file mode 100644
index 0000000000..757971ca89
--- /dev/null
+++ b/docs/library/network.rst
@@ -0,0 +1,63 @@
+****************************************
+:mod:`network` --- network configuration
+****************************************
+
+.. module:: network
+ :synopsis: network configuration
+
+This module provides network drivers and routing configuration.
+
+
+class CC3k
+==========
+
+Constructors
+------------
+
+.. class:: CC3k(spi, pin_cs, pin_en, pin_irq)
+
+ Initialise the CC3000 using the given SPI bus and pins and return a CC3k object.
+
+
+Methods
+-------
+
+.. method:: cc3k.connect(ssid, key=None, \*, security=WPA2, bssid=None)
+
+
+class WIZnet5k
+==============
+
+This class allows you to control WIZnet5x00 Ethernet adaptors based on
+the W5200 and W5500 chipsets (only W5200 tested).
+
+Example usage::
+
+ import wiznet5k
+ w = wiznet5k.WIZnet5k()
+ print(w.ipaddr())
+ w.gethostbyname('micropython.org')
+ s = w.socket()
+ s.connect(('192.168.0.2', 8080))
+ s.send('hello')
+ print(s.recv(10))
+
+
+Constructors
+------------
+
+.. class:: WIZnet5k(spi, pin_cs, pin_rst)
+
+ Create and return a WIZnet5k object.
+
+
+Methods
+-------
+
+.. method:: wiznet5k.ipaddr([(ip, subnet, gateway, dns)])
+
+ Get/set IP address, subnet mask, gateway and DNS.
+
+.. method:: wiznet5k.regs()
+
+ Dump WIZnet5k registers.