Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: eth/mac.c
- Revision:
- 143:8cec8f08dc54
- Parent:
- 105:ef2dd21d808c
- Child:
- 172:9bc3c7b2cca1
diff -r a8c0890a58d1 -r 8cec8f08dc54 eth/mac.c
--- a/eth/mac.c Wed May 08 12:15:13 2019 +0000
+++ b/eth/mac.c Thu May 09 07:47:12 2019 +0000
@@ -13,15 +13,15 @@
{
memset(mac, 0, 6);
}
-void MacCopy(char* macTo, char* macFrom)
+void MacCopy(char* macTo, const char* macFrom)
{
memcpy(macTo, macFrom, 6);
}
-bool MacIsSame(char* macA, char* macB)
+bool MacIsSame(const char* macA, const char* macB)
{
return memcmp(macA, macB, 6) == 0;
}
-bool MacIsEmpty(char* mac)
+bool MacIsEmpty(const char* mac)
{
if (*mac) return false;
mac++; if (*mac) return false;
@@ -32,20 +32,20 @@
return true;
}
-int MacToString(char* mac, int size, char* text)
+int MacToString(const char* mac, int size, char* text)
{
return snprintf(text, size, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
}
-int MacLog(char* mac)
+int MacLog(const char* mac)
{
return LogF("%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
}
-int MacHttp(char* mac)
+int MacHttp(const char* mac)
{
return HttpAddF("%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
}
-int MacAccept(char* p)
+int MacAccept(const char* p)
{
switch (*p)
{