AVRly - AVR Development Resources
|
Driver file providing logging functionality over USART, to print debug messages and values to a teminal program on your PC. More...
Go to the source code of this file.
Enumerations | |
enum | eLogLevel { NONE , INFO , DEBUG , VERBOSE_DEBUG , WARNING , ERROR , NONE , INFO , DEBUG , VERBOSE_DEBUG , WARNING , ERROR } |
Functions | |
void | init_log_system (void) |
Initialisation routine - call this function once at startup before using other functions. More... | |
void | log_message (const char *p_tag, enum eLogLevel level, const char *msg) |
void | log_message_with_dec_val (const char *p_tag, enum eLogLevel level, const char *msg, uint8_t val) |
void | log_message_with_16bit_dec_val (const char *p_tag, enum eLogLevel level, const char *msg, uint16_t val) |
void | log_message_with_bin_val (const char *p_tag, enum eLogLevel level, const char *msg, uint8_t val) |
void | log_message_with_hex_val (const char *p_tag, enum eLogLevel level, const char *msg, uint8_t val) |
void | log_set_output_level (const char *p_tag, enum eLogLevel level) |
void | log_global_on (void) |
Turns logging system on globally. More... | |
void | log_global_off (void) |
Turns logging system off globally. More... | |
Driver file providing logging functionality over USART, to print debug messages and values to a teminal program on your PC.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file log_system.h.
enum eLogLevel |
Definition at line 37 of file log_system.h.
void init_log_system | ( | void | ) |
Initialisation routine - call this function once at startup before using other functions.
Log system will then be turned on by default - call log_global_off() if you do not wish it to be.
Definition at line 46 of file log_system.c.
void log_message | ( | const char * | p_tag, |
enum eLogLevel | level, | ||
const char * | msg | ||
) |
Definition at line 54 of file log_system.c.
void log_message_with_dec_val | ( | const char * | p_tag, |
enum eLogLevel | level, | ||
const char * | msg, | ||
uint8_t | val | ||
) |
Definition at line 61 of file log_system.c.
void log_message_with_16bit_dec_val | ( | const char * | p_tag, |
enum eLogLevel | level, | ||
const char * | msg, | ||
uint16_t | val | ||
) |
Definition at line 74 of file log_system.c.
void log_message_with_bin_val | ( | const char * | p_tag, |
enum eLogLevel | level, | ||
const char * | msg, | ||
uint8_t | val | ||
) |
Definition at line 87 of file log_system.c.
void log_message_with_hex_val | ( | const char * | p_tag, |
enum eLogLevel | level, | ||
const char * | msg, | ||
uint8_t | val | ||
) |
Definition at line 115 of file log_system.c.
void log_set_output_level | ( | const char * | p_tag, |
enum eLogLevel | level | ||
) |
Definition at line 127 of file log_system.c.
void log_global_on | ( | void | ) |
Turns logging system on globally.
Definition at line 133 of file log_system.c.
void log_global_off | ( | void | ) |
Turns logging system off globally.
Definition at line 139 of file log_system.c.