10 #define MAX_DIGIT_BITS 12
11 const static char HEX_TABLE[] = {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
12 '8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'};
23 static void to_hex(uint32_t value,
char msg[])
29 for (; i > 1; i--, value >>= 4) {
30 msg[i] = HEX_TABLE[value & 0xF];
38 int32_t result_msg = 0, result_val;
42 result_msg = tfm_hal_output_spm_log(msg, len);
43 if (result_msg < TFM_HAL_SUCCESS) {
48 to_hex(value, value_str);
50 result_val = tfm_hal_output_spm_log(value_str,
52 if (result_val < TFM_HAL_SUCCESS) {
55 return (result_msg + result_val);
int32_t spm_log_msgval(const char *msg, size_t len, uint32_t value)
SPM output API to convert digit number into HEX string and call the HAL API tfm_hal_output_spm_log.