From b74590a4a5a043ef8202d5b891e8fca97e8dba51 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Mon, 28 Jul 2025 11:25:02 -0300 Subject: [PATCH] update to Zephyr 4.2.0 --- tutorials/zephyr/device-dashboard/src/main.c | 7 ++++++- tutorials/zephyr/http-client/src/main.c | 7 ++++++- tutorials/zephyr/http-server/src/main.c | 7 ++++++- tutorials/zephyr/mqtt-aws-client/src/main.c | 7 ++++++- tutorials/zephyr/websocket-server/src/main.c | 7 ++++++- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/tutorials/zephyr/device-dashboard/src/main.c b/tutorials/zephyr/device-dashboard/src/main.c index 0f513d58..c6a5c25e 100644 --- a/tutorials/zephyr/device-dashboard/src/main.c +++ b/tutorials/zephyr/device-dashboard/src/main.c @@ -10,7 +10,12 @@ // semaphore until this event handler releases it when the network is ready K_SEM_DEFINE(run, 0, 1); -static void zeh(struct net_mgmt_event_callback *cb, uint32_t mgmt_event, +static void zeh(struct net_mgmt_event_callback *cb, +#if ZEPHYR_VERSION_CODE < 0x40000 + uint32_t mgmt_event, +#else + uint64_t mgmt_event, +#endif struct net_if *iface) { if (mgmt_event == NET_EVENT_L4_CONNECTED) k_sem_give(&run); } diff --git a/tutorials/zephyr/http-client/src/main.c b/tutorials/zephyr/http-client/src/main.c index 5d028b10..e7039e9b 100644 --- a/tutorials/zephyr/http-client/src/main.c +++ b/tutorials/zephyr/http-client/src/main.c @@ -92,7 +92,12 @@ static void timer_fn(void *arg) { // semaphore until this event handler releases it when the network is ready K_SEM_DEFINE(run, 0, 1); -static void zeh(struct net_mgmt_event_callback *cb, uint32_t mgmt_event, +static void zeh(struct net_mgmt_event_callback *cb, +#if ZEPHYR_VERSION_CODE < 0x40000 + uint32_t mgmt_event, +#else + uint64_t mgmt_event, +#endif struct net_if *iface) { if (mgmt_event == NET_EVENT_L4_CONNECTED) k_sem_give(&run); } diff --git a/tutorials/zephyr/http-server/src/main.c b/tutorials/zephyr/http-server/src/main.c index ec822133..1dd7bb44 100644 --- a/tutorials/zephyr/http-server/src/main.c +++ b/tutorials/zephyr/http-server/src/main.c @@ -72,7 +72,12 @@ static void timer_fn(void *arg) { // semaphore until this event handler releases it when the network is ready K_SEM_DEFINE(run, 0, 1); -static void zeh(struct net_mgmt_event_callback *cb, uint32_t mgmt_event, +static void zeh(struct net_mgmt_event_callback *cb, +#if ZEPHYR_VERSION_CODE < 0x40000 + uint32_t mgmt_event, +#else + uint64_t mgmt_event, +#endif struct net_if *iface) { if (mgmt_event == NET_EVENT_L4_CONNECTED) k_sem_give(&run); } diff --git a/tutorials/zephyr/mqtt-aws-client/src/main.c b/tutorials/zephyr/mqtt-aws-client/src/main.c index c69151c8..3c575130 100644 --- a/tutorials/zephyr/mqtt-aws-client/src/main.c +++ b/tutorials/zephyr/mqtt-aws-client/src/main.c @@ -99,7 +99,12 @@ static void timer_fn(void *arg) { // semaphore until this event handler releases it when the network is ready K_SEM_DEFINE(run, 0, 1); -static void zeh(struct net_mgmt_event_callback *cb, uint32_t mgmt_event, +static void zeh(struct net_mgmt_event_callback *cb, +#if ZEPHYR_VERSION_CODE < 0x40000 + uint32_t mgmt_event, +#else + uint64_t mgmt_event, +#endif struct net_if *iface) { if (mgmt_event == NET_EVENT_L4_CONNECTED) k_sem_give(&run); } diff --git a/tutorials/zephyr/websocket-server/src/main.c b/tutorials/zephyr/websocket-server/src/main.c index 5c84b456..be19713d 100644 --- a/tutorials/zephyr/websocket-server/src/main.c +++ b/tutorials/zephyr/websocket-server/src/main.c @@ -68,7 +68,12 @@ static void timer_fn(void *arg) { // semaphore until this event handler releases it when the network is ready K_SEM_DEFINE(run, 0, 1); -static void zeh(struct net_mgmt_event_callback *cb, uint32_t mgmt_event, +static void zeh(struct net_mgmt_event_callback *cb, +#if ZEPHYR_VERSION_CODE < 0x40000 + uint32_t mgmt_event, +#else + uint64_t mgmt_event, +#endif struct net_if *iface) { if (mgmt_event == NET_EVENT_L4_CONNECTED) k_sem_give(&run); }