You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
467 B
C++

// TextEncoder.h
#ifndef _TEXTENCODER_h
#define _TEXTENCODER_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
class TextEncoder
{
private:
uint16_t size;
uint16_t current_index;
byte* data = nullptr;
public:
TextEncoder();
TextEncoder(String text);
~TextEncoder();
public:
void EncodeText(String text);
public:
bool HasNextChar();
bool IsLastChar();
void GetNextChar(byte& bit1, byte& bit2);
};
#endif