Add support for PAC/Stanley tags (#1648)

* Add support for PAC/Stanley tags
* Address review comments
This commit is contained in:
Sebastian Mauer
2022-08-29 16:04:17 +01:00
committed by GitHub
parent ffa3ff5e7c
commit 1350dcaf63
10 changed files with 287 additions and 6 deletions

View File

@@ -14,14 +14,22 @@ extern "C" {
*/
bool hex_char_to_hex_nibble(char c, uint8_t* nibble);
/** Convert ASCII hex values to byte
/** Convert ASCII hex value to byte
* @param hi hi nibble text
* @param low low nibble text
* @param value output value
*
* @return bool conversion status
*/
bool hex_chars_to_uint8(char hi, char low, uint8_t* value);
bool hex_char_to_uint8(char hi, char low, uint8_t* value);
/** Convert ASCII hex values to uint8_t
* @param value_str ASCII data
* @param value output value
*
* @return bool conversion status
*/
bool hex_chars_to_uint8(const char* value_str, uint8_t* value);
/** Convert ASCII hex values to uint64_t
* @param value_str ASCII 64 bi data
@@ -31,6 +39,14 @@ bool hex_chars_to_uint8(char hi, char low, uint8_t* value);
*/
bool hex_chars_to_uint64(const char* value_str, uint64_t* value);
/** Convert uint8_t to ASCII hex values
* @param src source data
* @param target output value
* @param length data length
*
*/
void uint8_to_hex_chars(const uint8_t* src, uint8_t* target, int length);
#ifdef __cplusplus
}
#endif