2021-06-30 15:02:46 +03:00
|
|
|
#pragma once
|
|
|
|
#include "stdint.h"
|
|
|
|
#include "stdbool.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2021-11-04 13:06:13 +03:00
|
|
|
* Convert ASCII hex value to nibble
|
2021-06-30 15:02:46 +03:00
|
|
|
* @param c ASCII character
|
|
|
|
* @param nibble nibble pointer, output
|
|
|
|
* @return bool conversion status
|
|
|
|
*/
|
|
|
|
bool hex_char_to_hex_nibble(char c, uint8_t* nibble);
|
|
|
|
|
2021-11-04 13:06:13 +03:00
|
|
|
/**
|
|
|
|
* Convert ASCII hex values 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);
|
|
|
|
|
2021-06-30 15:02:46 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|