mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/uhcp: convert to ztimer
This commit is contained in:
parent
cdffc8f0ca
commit
a42c39dbea
@ -167,7 +167,7 @@ endif
|
||||
|
||||
ifneq (,$(filter uhcpc,$(USEMODULE)))
|
||||
USEMODULE += posix_inet
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += ztimer_msec
|
||||
endif
|
||||
|
||||
ifneq (,$(filter netdev_tap,$(USEMODULE)))
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "net/af.h"
|
||||
#include "net/sock/udp.h"
|
||||
#include "net/uhcp.h"
|
||||
#include "xtimer.h"
|
||||
#include "ztimer.h"
|
||||
|
||||
/**
|
||||
* @brief Request prefix from uhcp server
|
||||
@ -51,7 +51,7 @@ void uhcp_client(uhcp_iface_t iface)
|
||||
res = sock_udp_recv(&sock, buf, sizeof(buf), 10U*US_PER_SEC, &remote);
|
||||
if (res > 0) {
|
||||
uhcp_handle_udp(buf, res, remote.addr.ipv6, remote.port, iface);
|
||||
xtimer_sleep(60);
|
||||
ztimer_sleep(ZTIMER_MSEC, 60 * MS_PER_SEC);
|
||||
}
|
||||
else {
|
||||
LOG_ERROR("uhcp_client(): no reply received\n");
|
||||
|
Loading…
Reference in New Issue
Block a user