We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa9ce28 commit 5f648ffCopy full SHA for 5f648ff
zephyr/main.c
@@ -62,6 +62,13 @@ static char heap[MICROPY_HEAP_SIZE];
62
63
void init_zephyr(void) {
64
// TODO: Make addresses configurable
65
+ #ifdef CONFIG_NETWORKING
66
+ if (net_if_get_default() == NULL) {
67
+ // If there's no default networking interface,
68
+ // there's nothing to configure.
69
+ return;
70
+ }
71
+ #endif
72
#ifdef CONFIG_NET_IPV4
73
static struct in_addr in4addr_my = {{{192, 0, 2, 1}}};
74
net_if_ipv4_addr_add(net_if_get_default(), &in4addr_my, NET_ADDR_MANUAL, 0);
0 commit comments