Files
GrowController/Firmware/Utility.h
David a0825b629e Remove stuff that came from a different app when this was derived.
Prepare to add DNSServer for captive portal.
2021-11-02 14:46:37 +00:00

36 lines
721 B
C

//
//
// 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