//
//
//	Utility.h
//
//
#ifndef UTILITY_H
#define UTILITY_H


#include <ESP8266WiFi.h>

// Returns the MAC Address as a string object
String GetMacString(char padd = ':');


// Dump a block of memory as a hex title-named listing
//
void HexDump(const char * title, const uint8_t * p, int count);


// A macro to generate a build error on the condition
//
// Example:
// 		BUILD_BUG_ON(sizeof(something) > limit);
//
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))

// And the more positive direction
//
// Example:
//		COMPILER_ASSERT(sizeof(something) <= limit);
//
#define COMPILER_ASSERT(condition) ((void)sizeof(char[-!(condition)]))

#endif // UTILITY_H
