summaryrefslogtreecommitdiff
path: root/stmhal/modwiznet5k.c
AgeCommit message (Collapse)Author
2014-12-04stmhal: Overhaul network drivers; has generic network protocol in C.Damien George
This patch overhauls the network driver interface. A generic NIC must provide a set of C-level functions to implement low-level socket control (eg socket, bind, connect, send, recv). Doing this, the network and usocket modules can then use such a NIC to implement proper socket control at the Python level. This patch also updates the CC3K and WIZNET5K drivers to conform to the new interface, and fixes some bugs in the drivers. They now work reasonably well.
2014-10-31stmhal: Update some inlined docs for network and CAN.Damien George
2014-10-22stmhal: Change cc3k.recv to only make 1 call to underlying recv().Damien George
Also make cc3k.send and cc3k.recv independent functions (not wrapped by stream write/read). Also make wiznet5k.recv more memory efficient. This might address issue #920.
2014-09-30stmhal: Fix wiznet5k init of SPI bus.Damien George
2014-09-30drivers, wiznet5k: Wrap exported functions in a macro for renaming.Damien George
3rd party drivers should not export generic names like "close".
2014-09-30stmhal: Add network and usocket module.Damien George
As per issue #876, the network module is used to configure NICs (hardware modules) and configure routing. The usocket module is supposed to implement the normal Python socket module and selects the underlying NIC using routing logic. Right now the routing logic is brain dead: first-initialised, first-used. And the routing table is just a list of registered NICs. cc3k and wiznet5k work, but not at the same time due to C name clashes (to be fixed). Note that the usocket module has alias socket, so that one can import socket and it works as normal. But you can also override socket with your own module, using usocket at the backend.
2014-09-17stmhal: Fix bugs in documentation so it compiles.Damien George
2014-09-01stmhal, modwiznet5k: Add very minimal documentation.Damien George
2014-09-01stmhal: Add wiznet5k module, to control WIZnet ethernet adaptor.Damien George
Allows to create socket objects that support TCP and UDP in server and client mode. Interface is very close to standard Python socket class, except bind and accept do not work the same (due to hardware not supporting them in the usual way). Not compiled by default. To compile this module, use: make MICROPY_PY_WIZNET5K=1