|
OPTIGA™ Trust M
Host Library Documentation
|
Go to the documentation of this file.
38 #ifndef _OPTIGA_LIB_LOGGER_H_
39 #define _OPTIGA_LIB_LOGGER_H_
48 #define OPTIGA_UTIL_SERVICE "[optiga util] : "
49 #define OPTIGA_CRYPT_SERVICE "[optiga crypt] : "
50 #define OPTIGA_COMMAND_LAYER "[optiga cmd] : "
51 #define OPTIGA_COMMUNICATION_LAYER "[optiga comms] : "
55 #define OPTIGA_LIB_LOGGER_COLOR_RED "\x1b[31m"
56 #define OPTIGA_LIB_LOGGER_COLOR_GREEN "\x1b[32m"
57 #define OPTIGA_LIB_LOGGER_COLOR_YELLOW "\x1b[33m"
58 #define OPTIGA_LIB_LOGGER_COLOR_BLUE "\x1b[34m"
59 #define OPTIGA_LIB_LOGGER_COLOR_MAGENTA "\x1b[35m"
60 #define OPTIGA_LIB_LOGGER_COLOR_CYAN "\x1b[36m"
61 #define OPTIGA_LIB_LOGGER_COLOR_LIGHT_GREY "\x1b[90m"
62 #define OPTIGA_LIB_LOGGER_COLOR_LIGHT_RED "\x1b[91m"
63 #define OPTIGA_LIB_LOGGER_COLOR_LIGHT_GREEN "\x1b[92m"
64 #define OPTIGA_LIB_LOGGER_COLOR_LIGHT_YELLOW "\x1b[93m"
65 #define OPTIGA_LIB_LOGGER_COLOR_LIGHT_BLUE "\x1b[94m"
66 #define OPTIGA_LIB_LOGGER_COLOR_LIGHT_MAGENTA "\x1b[95m"
67 #define OPTIGA_LIB_LOGGER_COLOR_LIGHT_CYAN "\x1b[96m"
68 #define OPTIGA_LIB_LOGGER_COLOR_DEFAULT "\x1b[0m"
71 #define OPTIGA_UTIL_SERVICE_COLOR OPTIGA_LIB_LOGGER_COLOR_DEFAULT
72 #define OPTIGA_CRYPT_SERVICE_COLOR OPTIGA_LIB_LOGGER_COLOR_DEFAULT
73 #define OPTIGA_COMMAND_LAYER_COLOR OPTIGA_LIB_LOGGER_COLOR_DEFAULT
74 #define OPTIGA_COMMUNICATION_LAYER_COLOR OPTIGA_LIB_LOGGER_COLOR_DEFAULT
75 #define OPTIGA_ERROR_COLOR OPTIGA_LIB_LOGGER_COLOR_RED
76 #define OPTIGA_UNPROTECTED_DATA_COLOR OPTIGA_LIB_LOGGER_COLOR_LIGHT_CYAN
77 #define OPTIGA_PROTECTED_DATA_COLOR OPTIGA_LIB_LOGGER_COLOR_YELLOW
79 #define OPTIGA_HEX_BYTE_SEPERATOR ""
135 const char_t * p_log_layer,
136 const char_t * p_log_color);
157 const char_t * p_log_color,
158 uint16_t return_value);
179 const char_t * p_log_color);
197 #define OPTIGA_LIB_LOGGER_PRINT_ARRAY(p_output_buffer, p_temp_buffer, p_color) \
199 sprintf((char_t *)p_output_buffer, \
203 OPTIGA_LIB_LOGGER_COLOR_DEFAULT); \
223 #define OPTIGA_LIB_LOGGER_PRINT_INFO(p_output_buffer, p_temp_buffer, p_layer, p_color) \
225 sprintf((char_t *)p_output_buffer, \
230 OPTIGA_LIB_LOGGER_COLOR_DEFAULT); \
This file contains the type definitions for the fundamental data types.
void optiga_lib_print_string_with_newline(const char_t *p_log_string)
To log a string with a new line.
void optiga_lib_print_status(const char_t *p_log_layer, const char_t *p_log_color, uint16_t return_value)
To log a return value with a new line and layer information.
void optiga_lib_print_array_hex_format(const uint8_t *p_log_string, uint16_t length, const char_t *p_log_color)
To log the byte array in hex format.
char char_t
Typedef for one byte integer.
void optiga_lib_print_message(const char_t *p_log_string, const char_t *p_log_layer, const char_t *p_log_color)
To log a string with a new line and layer information.
void optiga_lib_print_string(const char_t *input_string)
To log a string.