Skip to content

Commit b4982a0

Browse files
committed
hex: add TEXT class
1 parent ffafc52 commit b4982a0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/hex/hex.h

+16
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,20 @@ namespace arduino { namespace hex {
2323

2424
bool decode(const String in, uint8_t* out, uint32_t size);
2525

26+
class THEXT {
27+
28+
public:
29+
static inline String encode(const uint8_t* in, uint32_t size) {
30+
return arduino::hex::encode(in, size);
31+
}
32+
static inline String encodeUpper(const uint8_t* in, uint32_t size) {
33+
return arduino::hex::encodeUpper(in, size);
34+
}
35+
36+
static inline bool decode(const String in, uint8_t* out, uint32_t size) {
37+
return arduino::hex::decode(in, out, size);
38+
}
39+
40+
};
41+
2642
}} // arduino::hex

0 commit comments

Comments
 (0)