subsys/debug/gdb_server.c
/**
 * @brief Consume a hex number from a string and convert to long long number
 *
 * Consume the string up to the end of the hex number, i.e. the pointer to the
 * string is advanced and output that number via the @a value parameter.
 *
 * Does not handle negative numbers.
 *
 * @return The number of characters consumed from the string.
 */
@brief Consume a hex number from a string and convert to long long number
Consume the string up to the end of the hex number, i.e. the pointer to the
string is advanced and output that number via the @a value parameter.

Does not handle negative numbers.

@return The number of characters consumed from the string.
@brief Consume a hex number from a string and convert to long long number Consume the string up to the end of the hex number i . e . the pointer to the string is advanced and output that number via the @a value parameter . Does not handle negative numbers . @return The number of characters consumed from the string .
static int hex_str_to_longlong(unsigned char **hex_str, long long *value)
{
	int num_chars_consumed = 0;
	int hex_value;
	*value = 0;
	while (**hex_str) {
		hex_value = get_hex_char_value(**hex_str);
		if (hex_value < 0) {
			break;
		}
		*value = (*value << 4) | hex_value;
		num_chars_consumed++;
		(*hex_str)++;
	}
	return num_chars_consumed;
}
static int hex_str_to_longlong ( unsigned char * * hex_str , long long * value ) { int num_chars_consumed = 0 ; int hex_value ; * value = 0 ; while ( * * hex_str ) { hex_value = get_hex_char_value ( * * hex_str ) ; if ( hex_value < 0 ) { break ; } * value = ( * value << 4 ) | hex_value ; num_chars_consumed ++ ; ( * hex_str ) ++ ; } return num_chars_consumed ; }
@brief Consume a hex number from a string and convert to long long number
 Consume the string up to the end of the hex number, i.e.
@brief Consume a hex number from a string and convert to long long number Consume the string up to the end of the hex number i . e .