We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e03911 commit 450c4ddCopy full SHA for 450c4dd
cores/esp32/MacAddress8.cpp
@@ -1,5 +1,6 @@
1
#include <MacAddress8.h>
2
#include <stdio.h>
3
+#include <Print.h>
4
5
//Default constructor, blank mac address.
6
MacAddress8::MacAddress8() {
@@ -93,3 +94,15 @@ bool MacAddress8::operator==(const MacAddress8& mac2) const
93
94
{
95
return _mac.val == mac2._mac.val;
96
}
97
+
98
+size_t MacAddress8::printTo(Print& p) const
99
+{
100
+ size_t n = 0;
101
+ for(int i = 0; i < 8; i++) {
102
+ if(i){
103
+ n += p.print(':');
104
+ }
105
+ n += p.printf("%02x", _mac.bytes[i]);
106
107
+ return n;
108
+}
0 commit comments