36 #define KELVIN_TO_CELSIUS(k) (k - 273.15)
42 #define PGM_PRINT(s) Serial.print(stringFromProgmem(PSTR(s)))
48 #define PGM_PRINTLN(s) Serial.println(stringFromProgmem(PSTR(s)))
77 int sendData(
byte reg,
byte *data,
int len);
116 byte checksum(
byte *data,
byte len);
139 word
composeWord(
byte *buf,
int lowerByteIndex = 0,
bool littleEndian =
true);
175 void printBin(u32 val,
int n,
bool newLine =
false);
183 void printLongBin(u32 val,
bool newLine =
false);
184 void printWordBin(word val,
bool newLine =
false);
185 void printByteBin(
byte val,
bool newLine =
false);
191 void printWordHex(word val,
bool newLine =
false);
192 void printWordHex(PGM_P caption, word val,
bool newLine =
true);
193 void printByteHex(
byte val,
bool newLine =
false);
204 void printInteger(PGM_P caption,
int value,
bool newLine =
true);
209 void printInteger(PGM_P caption,
int value, PGM_P units,
bool newLine =
true);
214 void printInteger(
int value, PGM_P units,
bool newLine =
false);
216 void printFloat(
float value,
int format, PGM_P units,
bool newLine =
false);
217 void printFloat(PGM_P caption,
float value,
int format, PGM_P units);
218 void printFloat(PGM_P caption,
float value,
int format, PGM_P (*unitsFn)());
224 void printPremil(PGM_P caption,
int value, PGM_P units);
225 void printPremil(PGM_P caption,
int value, PGM_P (*unitsFn)());
230 void printFlag(PGM_P caption, u32 flags,
int n);
Structure that stores flag information.
Definition: flags.h:36
int sendData(byte reg, byte *data, int len)
Definition: utils.cpp:101
void printLongHex(u32 val, bool newLine=false)
Definition: utils.cpp:275
u32 composeDoubleWord(byte *buf)
Definition: utils.cpp:234
word composeWord(byte *buf, int lowerByteIndex=0, bool littleEndian=true)
Definition: utils.cpp:214
String stringFromProgmem(PGM_P stringPtr)
Definition: utils.cpp:266
u32 composeValue(byte *buf, int from, int till)
Definition: utils.cpp:249
void printInteger(PGM_P caption, int value, bool newLine=true)
Definition: utils.cpp:373
void printLongSplitBin(u32 val)
Definition: utils.cpp:325
int requestBlock(byte *buf)
Definition: utils.cpp:115
void printFlag(PGM_P caption, u32 flags, int n)
Definition: utils.cpp:406
int sendCommand(byte reg, word command)
Definition: utils.cpp:83
int requestBytes(byte *buf, int len)
Definition: utils.cpp:140
word requestWord()
Definition: utils.cpp:156
bool isAllowedRequestPayloadSize(int len)
Definition: utils.cpp:59
void printBytesHex(byte *buf, int len)
Definition: utils.cpp:301
void printBin(u32 val, int n, bool newLine=false)
Definition: utils.cpp:315
void printPremil(PGM_P caption, int value, PGM_P units)
Definition: utils.cpp:397
byte checksum(byte *data, byte len)
Definition: utils.cpp:173
bool validate(byte *data)
Definition: utils.cpp:184