added some supprt fct for cliparser, to take a hex byte param and fall back to a default value, or specify how many bytes the param must be

This commit is contained in:
iceman1001 2021-01-11 23:29:49 +01:00
commit ad1f3eae57
2 changed files with 24 additions and 0 deletions

View file

@ -68,4 +68,6 @@ int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen);
uint64_t arg_get_u64_hexstr_def(CLIParserContext *ctx, uint8_t paramnum, uint64_t def);
int arg_get_u32_hexstr_def(CLIParserContext *ctx, uint8_t paramnum, uint32_t def, uint32_t *out);
int arg_get_u32_hexstr_def_nlen(CLIParserContext *ctx, uint8_t paramnum, uint32_t def, uint32_t *out, uint8_t nlen);
#endif