summaryrefslogtreecommitdiff
path: root/shared-bindings/wiznet/wiznet5k.c
diff options
context:
space:
mode:
authordherrada <dylan.herrada@gmail.com>2020-05-12 12:08:46 -0400
committerdherrada <dylan.herrada@gmail.com>2020-05-12 12:08:46 -0400
commit6490137812eb9f0c0b08ad81bc77ea21f5f31d04 (patch)
tree761235273db90a8eadfc1f28fea793396a6f859f /shared-bindings/wiznet/wiznet5k.c
parente4589543fbe8df12f5c30101e94ddc0fa95cd29e (diff)
Did usb_hid, usb_midi, ustack, wiznet
Diffstat (limited to 'shared-bindings/wiznet/wiznet5k.c')
-rw-r--r--shared-bindings/wiznet/wiznet5k.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/shared-bindings/wiznet/wiznet5k.c b/shared-bindings/wiznet/wiznet5k.c
index 786978bfe..2e2ee3949 100644
--- a/shared-bindings/wiznet/wiznet5k.c
+++ b/shared-bindings/wiznet/wiznet5k.c
@@ -46,25 +46,26 @@
#include "shared-module/network/__init__.h"
#include "shared-module/wiznet/wiznet5k.h"
-//| .. currentmodule:: wiznet
+//| class WIZNET5K:
+//| """.. currentmodule:: wiznet
//|
-//| :class:`WIZNET5K` -- wrapper for Wiznet 5500 Ethernet interface
-//| ===============================================================
+//| :class:`WIZNET5K` -- wrapper for Wiznet 5500 Ethernet interface
+//| ==============================================================="""
//|
-//| .. class:: WIZNET5K(spi, cs, rst, dhcp=True)
+//| def __init__(self, spi: busio.SPI, cs: microcontroller.Pin, rst: microcontroller.Pin, dhcp: bool = True):
+//| """Create a new WIZNET5500 interface using the specified pins
//|
-//| Create a new WIZNET5500 interface using the specified pins
+//| :param ~busio.SPI spi: spi bus to use
+//| :param ~microcontroller.Pin cs: pin to use for Chip Select
+//| :param ~microcontroller.Pin rst: pin to use for Reset (optional)
+//| :param bool dhcp: boolean flag, whether to start DHCP automatically (optional, keyword only, default True)
//|
-//| :param ~busio.SPI spi: spi bus to use
-//| :param ~microcontroller.Pin cs: pin to use for Chip Select
-//| :param ~microcontroller.Pin rst: pin to use for Reset (optional)
-//| :param bool dhcp: boolean flag, whether to start DHCP automatically (optional, keyword only, default True)
-//|
-//| * The reset pin is optional: if supplied it is used to reset the
-//| wiznet board before initialization.
-//| * The SPI bus will be initialized appropriately by this library.
-//| * At present, the WIZNET5K object is a singleton, so only one WizNet
-//| interface is supported at a time.
+//| * The reset pin is optional: if supplied it is used to reset the
+//| wiznet board before initialization.
+//| * The SPI bus will be initialized appropriately by this library.
+//| * At present, the WIZNET5K object is a singleton, so only one WizNet
+//| interface is supported at a time."""
+//| ...
//|
STATIC mp_obj_t wiznet5k_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@@ -86,9 +87,8 @@ STATIC mp_obj_t wiznet5k_make_new(const mp_obj_type_t *type, size_t n_args, cons
return ret;
}
-//| .. attribute:: connected
-//|
-//| (boolean, readonly) is this device physically connected?
+//| connected: Any = ...
+//| """(boolean, readonly) is this device physically connected?"""
//|
STATIC mp_obj_t wiznet5k_connected_get_value(mp_obj_t self_in) {
@@ -104,11 +104,10 @@ const mp_obj_property_t wiznet5k_connected_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| .. attribute:: dhcp
+//| dhcp: Any = ...
+//| """(boolean, readwrite) is DHCP active on this device?
//|
-//| (boolean, readwrite) is DHCP active on this device?
-//|
-//| * set to True to activate DHCP, False to turn it off
+//| * set to True to activate DHCP, False to turn it off"""
//|
STATIC mp_obj_t wiznet5k_dhcp_get_value(mp_obj_t self_in) {
@@ -138,13 +137,13 @@ const mp_obj_property_t wiznet5k_dhcp_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| .. method:: ifconfig(params=None)
-//|
-//| Called without parameters, returns a tuple of
-//| (ip_address, subnet_mask, gateway_address, dns_server)
+//| def ifconfig(self, params: Any = None) -> Any:
+//| """Called without parameters, returns a tuple of
+//| (ip_address, subnet_mask, gateway_address, dns_server)
//|
-//| Or can be called with the same tuple to set those parameters.
-//| Setting ifconfig parameters turns DHCP off, if it was on.
+//| Or can be called with the same tuple to set those parameters.
+//| Setting ifconfig parameters turns DHCP off, if it was on."""
+//| ...
//|
STATIC mp_obj_t wiznet5k_ifconfig(size_t n_args, const mp_obj_t *args) {