#ifndef __MAX80_FUNC_H__ #define __MAX80_FUNC_H__ #include struct utf8decodedata { uint8_t state; uint8_t left; uint8_t acc; uint8_t data; uint8_t error; }; namespace max80 { class std_max80 { public: void reverse8(uint8_t *buf, int size, uint8_t *rev); String hex_to_string(uint8_t *buf, int size, String separator = ""); void serial_empty(HardwareSerial *port); int hex_to_int(char c); int hex_to_ascii(char c, char d); void hex2bin(uint8_t *out, const char *in, size_t *size); void getmac_b(String mac, uint8_t *mac_b); String hexaddr(uint8_t *buf); uint8_t processutf8String(const uint8_t* s,uint8_t len,uint8_t* d); private: void processutf8(uint8_t b,utf8decodedata *data); }; } #endif // __MAX80__STD_H__