38static const char *p_system_tag =
"log_system";
40static bool log_system_enabled =
false;
50 log_message(p_system_tag, INFO,
"Log system initialised");
54void log_message(
const char *p_tag,
enum eLogLevel level,
const char *msg)
74void log_message_with_16bit_dec_val(
const char *p_tag,
99void log_message_with_16bit_bin_val(
const char *p_tag,
100 enum eLogLevel level,
108 uint8_t msb = (val >> 8);
116 enum eLogLevel level,
127void log_set_output_level(
const char *p_tag,
enum eLogLevel level)
135 log_system_enabled =
true;
141 log_system_enabled =
false;
165 else if (level == DEBUG)
170 else if (level == VERBOSE_DEBUG)
175 else if (level == WARNING)
180 else if (level == ERROR)
void init_usart(void)
Takes the defined BAUD and F_CPU, calculates the bit-clock multiplier, configures the hardware USART ...
void log_global_on(void)
Turns logging system on globally.
void init_log_system(void)
Initialisation routine - call this function once at startup before using other functions.
void log_global_off(void)
Turns logging system off globally.
void print_word(uint16_t word)
Prints a word (16-bits) out as its 5-digit ascii equivalent.
void print_string(const char myString[])
Utility function to transmit an entire string from RAM.
void print_binary_byte(uint8_t byte)
Prints a byte out in 1s and 0s.
void print_hex_byte(uint8_t byte)
Prints a byte out in hexadecimal.
void print_byte(uint8_t byte)
Prints a byte out as its 3-digit ascii equivalent.
Driver file providing logging functionality over USART, to print debug messages and values to a temin...
Driver file providing core USART communication between the target MCU and your PC.