Debug API

group Debug

Defines

BASENAME(_file)
csp_assert(exp)
CONSTSTR(data)
csp_debug(...)
csp_log_error(...)
csp_log_warn(...)
csp_log_info(...)
csp_log_buffer(...)
csp_log_packet(...)
csp_log_protocol(...)
csp_log_lock(...)

Enums

enum csp_debug_level_t

Debug levels.

Values:

CSP_ERROR = 0
CSP_WARN = 1
CSP_INFO = 2
CSP_BUFFER = 3
CSP_PACKET = 4
CSP_PROTOCOL = 5
CSP_LOCK = 6

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.

Parameters
  • level:
  • format:

void csp_debug_toggle_level(csp_debug_level_t level)

Toggle debug level on/off.

Parameters
  • level: Level to toggle

void csp_debug_set_level(csp_debug_level_t level, bool value)

Set debug level.

Parameters
  • level: Level to set
  • value: New level value

int csp_debug_get_level(csp_debug_level_t level)

Get current debug level value.

Return
Level value
Parameters
  • level: Level value to get

Variables

unsigned char csp_debug_level_enabled[]