summaryrefslogtreecommitdiff
path: root/firmware/src
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-05-30 22:06:31 +0200
committerxengineering <me@xengineering.eu>2024-05-30 22:12:34 +0200
commitb8147bcba2e8dfef419ba14053285bc9750dc319 (patch)
tree62a7129f0805ec2eea65ab79e63305c848762083 /firmware/src
parent17008662c08e8e99aefc1814dd80d366872d7ded (diff)
downloadiot-core-b8147bcba2e8dfef419ba14053285bc9750dc319.tar
iot-core-b8147bcba2e8dfef419ba14053285bc9750dc319.tar.zst
iot-core-b8147bcba2e8dfef419ba14053285bc9750dc319.zip
firmware: Rename from uid64 to eui64
The term EUI-64 is more commonly known (see Wikipedia about MAC addresses [1]). The term UID-64 was introduced because of ST documentation. [1]: https://en.wikipedia.org/wiki/MAC_address
Diffstat (limited to 'firmware/src')
-rw-r--r--firmware/src/eui64.c (renamed from firmware/src/uid64.c)10
-rw-r--r--firmware/src/eui64.h (renamed from firmware/src/uid64.h)6
2 files changed, 8 insertions, 8 deletions
diff --git a/firmware/src/uid64.c b/firmware/src/eui64.c
index afe5b33..516ff84 100644
--- a/firmware/src/uid64.c
+++ b/firmware/src/eui64.c
@@ -3,11 +3,11 @@
#include <zephyr/devicetree.h>
-#include "uid64.h"
+#include "eui64.h"
-#define UID64_NODE DT_NODELABEL(uid64)
+#define UID64_NODE DT_NODELABEL(eui64)
-uint64_t uid64_get(void) {
+uint64_t eui64_get(void) {
#if DT_NODE_EXISTS(UID64_NODE)
return *(volatile uint64_t *) DT_REG_ADDR(UID64_NODE);
#else
@@ -15,7 +15,7 @@ uint64_t uid64_get(void) {
#endif
}
-void uid64_to_string(uint64_t uid, char *str) {
+void eui64_to_string(uint64_t uid, char *str) {
uint8_t *source = (uint8_t *)&uid + 7;
char *sink = str;
@@ -33,7 +33,7 @@ void uid64_to_string(uint64_t uid, char *str) {
}
}
-bool uid64_available(void) {
+bool eui64_available(void) {
#if DT_NODE_EXISTS(UID64_NODE)
return true;
#else
diff --git a/firmware/src/uid64.h b/firmware/src/eui64.h
index cd3fb13..b7a8a6f 100644
--- a/firmware/src/uid64.h
+++ b/firmware/src/eui64.h
@@ -3,6 +3,6 @@
/* 2 chars per byte (hex), 1 char per ':' delimiter and one char for \0 */
#define UID64_STR_LEN (8*2 + 7*1 + 1)
-uint64_t uid64_get(void);
-void uid64_to_string(uint64_t, char *str);
-bool uid64_available(void);
+uint64_t eui64_get(void);
+void eui64_to_string(uint64_t, char *str);
+bool eui64_available(void);