#pragma once // system includes #include #include // 3rdparty lib includes #include // esp-idf includes #include #include namespace espcpputils { std::string toString(sntp_sync_mode_t val); std::string toString(sntp_sync_status_t val); std::string toString(esp_log_level_t val); std::string toString(esp_reset_reason_t val); std::string toHexString(std::basic_string_view buf); inline std::string toHexString(std::string_view str) { return toHexString(std::basic_string_view{reinterpret_cast(str.data()), str.size()}); } tl::expected, std::string> fromHexString(std::string_view hex); } // namespace espcpputils