Skip to content

Commit

Permalink
Update version support
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Dec 3, 2024
1 parent 5d1bd91 commit 09c34c7
Show file tree
Hide file tree
Showing 3 changed files with 624 additions and 556 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/zephyr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ jobs:
mkdir -p $ZEPHYR_BASE
cd $ZEPHYR_BASE
pio init -b nucleo_f767zi \
--project-option="[email protected]" \
--project-option="board_build.cmake_extra_args=-DZ_FEATURE_LINK_SERIAL=1 -DZENOH_DEBUG=3"
pio init -b nucleo_f767zi --project-option="framework=zephyr" --project-option="board_build.cmake_extra_args=-DZ_FEATURE_LINK_SERIAL=1 -DZENOH_DEBUG=3"
cd $ZEPHYR_BASE/lib
ln -s $ZENOH_PICO_BASE
Expand Down
22 changes: 12 additions & 10 deletions include/zenoh-pico/system/platform/zephyr.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#if KERNEL_VERSION_MAJOR == 2
#include <kernel.h>
#elif KERNEL_VERSION_MAJOR == 3
#elif KERNEL_VERSION_MAJOR == 3 || KERNEL_VERSION_MAJOR == 4
#include <zephyr/kernel.h>
#else
#pragma GCC warning "This Zephyr version might not be supported."
Expand All @@ -45,22 +45,24 @@ typedef struct timespec z_clock_t;
typedef struct timeval z_time_t;

typedef struct {
union {
#if Z_FEATURE_LINK_TCP == 1 || Z_FEATURE_LINK_UDP_MULTICAST == 1 || Z_FEATURE_LINK_UDP_UNICAST == 1
int _fd;
union {
#if Z_FEATURE_LINK_TCP == 1 || Z_FEATURE_LINK_UDP_MULTICAST == 1 || \
Z_FEATURE_LINK_UDP_UNICAST == 1
int _fd;
#endif
#if Z_FEATURE_LINK_SERIAL == 1
const struct device *_serial;
const struct device *_serial;
#endif
};
};
} _z_sys_net_socket_t;

typedef struct {
union {
#if Z_FEATURE_LINK_TCP == 1 || Z_FEATURE_LINK_UDP_MULTICAST == 1 || Z_FEATURE_LINK_UDP_UNICAST == 1
struct addrinfo *_iptcp;
union {
#if Z_FEATURE_LINK_TCP == 1 || Z_FEATURE_LINK_UDP_MULTICAST == 1 || \
Z_FEATURE_LINK_UDP_UNICAST == 1
struct addrinfo *_iptcp;
#endif
};
};
} _z_sys_net_endpoint_t;

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 09c34c7

Please sign in to comment.