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);
198 #define OPTIGA_LIB_LOGGER_PRINT_ARRAY(p_output_buffer, p_temp_buffer, p_color) \ 200 sprintf((char_t *)p_output_buffer, \ 204 OPTIGA_LIB_LOGGER_COLOR_DEFAULT); \ 207 #define OPTIGA_LIB_LOGGER_PRINT_ARRAY(p_output_buffer, p_temp_buffer, p_color) \ 209 sprintf_s((char_t *)p_output_buffer, \ 210 sizeof(p_output_buffer), \ 214 OPTIGA_LIB_LOGGER_COLOR_DEFAULT); \ 237 #define OPTIGA_LIB_LOGGER_PRINT_INFO(p_output_buffer, p_temp_buffer, p_layer, p_color) \ 239 sprintf((char_t *)p_output_buffer, \ 244 OPTIGA_LIB_LOGGER_COLOR_DEFAULT); \ 247 #define OPTIGA_LIB_LOGGER_PRINT_INFO(p_output_buffer, p_temp_buffer, p_layer, p_color) \ 249 sprintf_s((char_t *)p_output_buffer, \ 250 sizeof(p_output_buffer), \ 255 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.
Definition: optiga_lib_logger.c:144
char char_t
Typedef for one byte integer.
Definition: optiga_lib_types.h:82
void optiga_lib_print_string(const char_t *input_string)
To log a string.
Definition: optiga_lib_logger.c:133
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.
Definition: optiga_lib_logger.c:179
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.
Definition: optiga_lib_logger.c:160
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.
Definition: optiga_lib_logger.c:219