MQTT messages. Button anleren, Wifi frontend
This commit is contained in:
10
src/helper.h
Normal file
10
src/helper.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include "master.h"
|
||||
|
||||
std::array<uint8_t, 6> macStringToBytes(const char* macStr) {
|
||||
std::array<uint8_t, 6> bytes;
|
||||
sscanf(macStr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
|
||||
&bytes[0], &bytes[1], &bytes[2], &bytes[3], &bytes[4], &bytes[5]);
|
||||
return bytes;
|
||||
}
|
||||
Reference in New Issue
Block a user