csp_debug.h File Reference
#include <inttypes.h>
#include <string.h>

Go to the source code of this file.

Macros

#define BASENAME(_file)   ((strrchr(_file, '/') ? : (strrchr(_file, '\\') ? : _file))+1)
 
#define csp_assert(exp)
 
#define CONSTSTR(data)   data
 
#define csp_debug(...)   do {} while (0)
 
#define csp_log_error(...)   do {} while (0)
 
#define csp_log_warn(...)   do {} while (0)
 
#define csp_log_info(...)   do {} while (0)
 
#define csp_log_buffer(...)   do {} while (0)
 
#define csp_log_packet(...)   do {} while (0)
 
#define csp_log_protocol(...)   do {} while (0)
 
#define csp_log_lock(...)   do {} while (0)
 

Enumerations

enum  csp_debug_level_t {
  CSP_ERROR = 0, CSP_WARN = 1, CSP_INFO = 2, CSP_BUFFER = 3,
  CSP_PACKET = 4, CSP_PROTOCOL = 5, CSP_LOCK = 6
}
 Debug levels. More...
 

Functions

void csp_assert_fail_action (char *assertion, const char *file, int line)
 
void do_csp_debug (csp_debug_level_t level, const char *format,...)
 This function should not be used directly, use csp_log_<level>() macro instead. More...
 
void csp_debug_toggle_level (csp_debug_level_t level)
 Toggle debug level on/off. More...
 
void csp_debug_set_level (csp_debug_level_t level, bool value)
 Set debug level. More...
 
int csp_debug_get_level (csp_debug_level_t level)
 Get current debug level value. More...
 

Variables

unsigned char csp_debug_level_enabled []