Add uint64_t cast of an address

This commit is contained in:
h2zero
2020-06-19 12:32:57 -06:00
parent f624deacb5
commit afb2f8d4c7
2 changed files with 7 additions and 0 deletions

View File

@@ -142,4 +142,10 @@ NimBLEAddress::operator std::string() const {
return std::string(buffer);
}
NimBLEAddress::operator uint64_t() const {
uint64_t address = 0;
memcpy(&address, m_address, sizeof m_address);
return address;
}
#endif