Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e00a702

Browse filesBrowse files
committed
Stop DHCP when configuring IP address adafruit#1800
1 parent 832f07a commit e00a702
Copy full SHA for e00a702

1 file changed

+3-2Lines changed: 3 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎shared-bindings/wiznet/wiznet5k.c‎

Copy file name to clipboardExpand all lines: shared-bindings/wiznet/wiznet5k.c
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ STATIC mp_obj_t wiznet5k_make_new(const mp_obj_type_t *type, size_t n_args, cons
7777
};
7878
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
7979
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
80-
// XXX check type of ARG_spi?
80+
// TODO check type of ARG_spi?
8181
assert_pin(args[ARG_cs].u_obj, false);
8282
assert_pin(args[ARG_rst].u_obj, true); // may be NULL
8383

@@ -144,6 +144,7 @@ const mp_obj_property_t wiznet5k_dhcp_obj = {
144144
//| (ip_address, subnet_mask, gateway_address, dns_server)
145145
//|
146146
//| Or can be called with the same tuple to set those parameters.
147+
//| Setting ifconfig parameters turns DHCP off, if it was on.
147148
//|
148149

149150
STATIC mp_obj_t wiznet5k_ifconfig(size_t n_args, const mp_obj_t *args) {
@@ -160,7 +161,7 @@ STATIC mp_obj_t wiznet5k_ifconfig(size_t n_args, const mp_obj_t *args) {
160161
return mp_obj_new_tuple(4, tuple);
161162
} else {
162163
// set
163-
// XXX should this automatically stop DHCP here?
164+
wiznet5k_stop_dhcp();
164165
mp_obj_t *items;
165166
mp_obj_get_array_fixed_n(args[1], 4, &items);
166167
netutils_parse_ipv4_addr(items[0], netinfo.ip, NETUTILS_BIG);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.