10#define CS_UUID_STR_LEN 36
18 if (
'0' <= chr && chr <=
'9') {
21 else if (
'a' <= chr && chr <=
'f') {
22 return chr -
'a' + 10;
24 else if (
'A' <= chr && chr <=
'F') {
25 return chr -
'A' + 10;
40constexpr bool parseUuid(
const char* str,
int stringSize, uint8_t* array,
int arraySize) {
#define CS_UUID_STR_LEN
Definition: cs_UuidParser.h:10
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Oct 29,...
constexpr int parseHexChar(const char chr)
Parses a hex char to an integer.
Definition: cs_UuidParser.h:17
constexpr bool parseUuid(const char *str, int stringSize, uint8_t *array, int arraySize)
Parse UUID string (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) to a byte array.
Definition: cs_UuidParser.h:40
constexpr int parseHexPair(const char *str)
Parses 2 hex chars to an integer.
Definition: cs_UuidParser.h:33