Skip to content

Commit 832f07a

Browse files
committed
Update docs for wiznet5k adafruit#1800
1 parent 264fc2b commit 832f07a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

shared-bindings/wiznet/wiznet5k.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@
5757
//|
5858
//| :param ~busio.SPI spi: spi bus to use
5959
//| :param ~microcontroller.Pin cs: pin to use for Chip Select
60-
//| :param ~microcontroller.Pin rst: pin to use for Reset
61-
//| :param bool dhcp: boolean flag, whether to start DHCP automatically (default True)
60+
//| :param ~microcontroller.Pin rst: pin to use for Reset (optional)
61+
//| :param bool dhcp: boolean flag, whether to start DHCP automatically (optional, keyword only, default True)
62+
//|
63+
//| * The reset pin is optional: if supplied it is used to reset the
64+
//| wiznet board before initialization.
65+
//| * The SPI bus will be initialized appropriately by this library.
66+
//| * At present, the WIZNET5K object is a singleton, so only one WizNet
67+
//| interface is supported at a time.
6268
//|
6369

6470
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) {
@@ -82,7 +88,7 @@ STATIC mp_obj_t wiznet5k_make_new(const mp_obj_type_t *type, size_t n_args, cons
8288

8389
//| .. attribute:: connected
8490
//|
85-
//| is this device physically connected?
91+
//| (boolean, readonly) is this device physically connected?
8692
//|
8793

8894
STATIC mp_obj_t wiznet5k_connected_get_value(mp_obj_t self_in) {
@@ -100,7 +106,9 @@ const mp_obj_property_t wiznet5k_connected_obj = {
100106

101107
//| .. attribute:: dhcp
102108
//|
103-
//| is DHCP active on this device? (set to true to activate DHCP, false to turn it off)
109+
//| (boolean, readwrite) is DHCP active on this device?
110+
//|
111+
//| * set to True to activate DHCP, False to turn it off
104112
//|
105113

106114
STATIC mp_obj_t wiznet5k_dhcp_get_value(mp_obj_t self_in) {
@@ -152,6 +160,7 @@ STATIC mp_obj_t wiznet5k_ifconfig(size_t n_args, const mp_obj_t *args) {
152160
return mp_obj_new_tuple(4, tuple);
153161
} else {
154162
// set
163+
// XXX should this automatically stop DHCP here?
155164
mp_obj_t *items;
156165
mp_obj_get_array_fixed_n(args[1], 4, &items);
157166
netutils_parse_ipv4_addr(items[0], netinfo.ip, NETUTILS_BIG);

0 commit comments

Comments
 (0)