diff options
author | xengineering <me@xengineering.eu> | 2024-06-01 11:17:50 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-06-01 12:04:57 +0200 |
commit | df38994a4a784cc7b794c3f2a3c7f08172ef51ad (patch) | |
tree | 30a4eae745213806c4914522fc0219ada68ad597 | |
parent | ff3fa235236f2d6d92f7869fb4f55e3655b0502a (diff) | |
download | iot-core-df38994a4a784cc7b794c3f2a3c7f08172ef51ad.tar iot-core-df38994a4a784cc7b794c3f2a3c7f08172ef51ad.tar.zst iot-core-df38994a4a784cc7b794c3f2a3c7f08172ef51ad.zip |
firmware: Assert presence of EUI-64 MAC address
Without that address comunication is not possible.
-rw-r--r-- | firmware/src/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/src/main.c b/firmware/src/main.c index 18e4564..5abd68a 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -5,6 +5,7 @@ #include <zephyr/kernel.h> #include <zephyr/sys/util.h> +#include "eui64.h" #include "data_link.h" #define UART_DEVICE_NODE DT_CHOSEN(zephyr_shell_uart) @@ -13,7 +14,12 @@ static const struct device *const uart_dev = DEVICE_DT_GET(UART_DEVICE_NODE); int main(void) { if (!device_is_ready(uart_dev)) { - printk("UART device not found!"); + printk("UART device not found"); + return 0; + } + + if (!eui64_available()) { + printk("No EUI-64 address available"); return 0; } |