![]() |
PDK API Guide for AM65xx
|
This file contains private type definitions and helper macros for the Enet trace interface.
Go to the source code of this file.
Macros | |
#define | ENETTRACE_trace(globalLevel, level, fmt, ...) |
Trace prefix type. More... | |
#define | ENETTRACE_ERR(fmt, ...) |
Helper macro to add trace message with ENET_TRACE_ERROR level. More... | |
#define | ENETTRACE_ERR_IF(cond, ...) ((cond) ? ENETTRACE_ERR(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_ERROR level if a condition is met. More... | |
#define | ENETTRACE_WARN(fmt, ...) |
Helper macro to add trace message with ENET_TRACE_WARN level. More... | |
#define | ENETTRACE_WARN_IF(cond, ...) ((cond) ? ENETTRACE_WARN(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_WARN level if a condition is met. More... | |
#define | ENETTRACE_INFO(fmt, ...) |
Helper macro to add trace message with ENET_TRACE_INFO level. More... | |
#define | ENETTRACE_INFO_IF(cond, ...) ((cond) ? ENETTRACE_INFO(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_INFO level if a condition is met. More... | |
#define | ENETTRACE_DBG(fmt, ...) |
Helper macro to add trace message with ENET_TRACE_DEBUG level. More... | |
#define | ENETTRACE_DBG_IF(cond, ...) ((cond) ? ENETTRACE_DBG(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_DEBUG level if a condition is met. More... | |
#define | ENETTRACE_VERBOSE(fmt, ...) |
Helper macro to add trace message with ENET_TRACE_VERBOSE level. More... | |
#define | ENETTRACE_VERBOSE_IF(cond, ...) ((cond) ? ENETTRACE_VERBOSE(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_VERBOSE level if a condition is met. More... | |
#define | ENETTRACE_VAR(var) ((var) = (var)) |
Variable declaration helper macro to avoid unused variable error (-Werror=unused-variable) when variable is used in TRACE and when corresponding trace level is not enabled. More... | |
Functions | |
void | EnetTrace_trace (EnetTrace_TraceLevel globalLevel, EnetTrace_TraceLevel level, const char *fmt,...) |
Log a trace message if log level is enabled. More... | |
EnetTrace_TraceLevel | EnetTrace_setLevel (EnetTrace_TraceLevel level) |
Set runtime trace level. More... | |
EnetTrace_TraceLevel | EnetTrace_getLevel (void) |
Get runtime trace level. More... | |
Variables | |
EnetTrace_TraceLevel | gEnetTrace_runtimeLevel |
Enabled runtime trace level. More... | |
#define ENETTRACE_trace | ( | globalLevel, | |
level, | |||
fmt, | |||
... | |||
) |
Trace prefix type.
#define ENETTRACE_ERR | ( | fmt, | |
... | |||
) |
Helper macro to add trace message with ENET_TRACE_ERROR level.
#define ENETTRACE_ERR_IF | ( | cond, | |
... | |||
) | ((cond) ? ENETTRACE_ERR(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_ERROR level if a condition is met.
#define ENETTRACE_WARN | ( | fmt, | |
... | |||
) |
Helper macro to add trace message with ENET_TRACE_WARN level.
#define ENETTRACE_WARN_IF | ( | cond, | |
... | |||
) | ((cond) ? ENETTRACE_WARN(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_WARN level if a condition is met.
#define ENETTRACE_INFO | ( | fmt, | |
... | |||
) |
Helper macro to add trace message with ENET_TRACE_INFO level.
Traces with this level should give only important informational messages to the user, which typically they don't occur very often (i.e. "NIMU is ready", "PHY n link is up"). This trace level may be enabled by default.
#define ENETTRACE_INFO_IF | ( | cond, | |
... | |||
) | ((cond) ? ENETTRACE_INFO(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_INFO level if a condition is met.
#define ENETTRACE_DBG | ( | fmt, | |
... | |||
) |
Helper macro to add trace message with ENET_TRACE_DEBUG level.
Traces with this level will provide the user further information about operations taking place (i.e. "MDIO module is open", "PHY n has started auto-negotiation, etc). This trace level is likely not enabled by default, so most of driver's traces will follow in this category.
#define ENETTRACE_DBG_IF | ( | cond, | |
... | |||
) | ((cond) ? ENETTRACE_DBG(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_DEBUG level if a condition is met.
#define ENETTRACE_VERBOSE | ( | fmt, | |
... | |||
) |
Helper macro to add trace message with ENET_TRACE_VERBOSE level.
Traces with this level will provide even more information and much more often than the DEBUG level (i.e. "PHY n: NWAY_WAIT state", "DMA transfer is complete"). Enabling this trace level is likely going to flood with messages, so developers must ensure that their debug messages that occur often enough are set with VERBOSE level.
#define ENETTRACE_VERBOSE_IF | ( | cond, | |
... | |||
) | ((cond) ? ENETTRACE_VERBOSE(__VA_ARGS__) : 0U) |
Helper macro to add trace message with ENET_TRACE_VERBOSE level if a condition is met.
#define ENETTRACE_VAR | ( | var | ) | ((var) = (var)) |
Variable declaration helper macro to avoid unused variable error (-Werror=unused-variable) when variable is used in TRACE and when corresponding trace level is not enabled.
void EnetTrace_trace | ( | EnetTrace_TraceLevel | globalLevel, |
EnetTrace_TraceLevel | level, | ||
const char * | fmt, | ||
... | |||
) |
Log a trace message if log level is enabled.
Log trace messages for log levels that are enabled at runtime.
globalLevel | Trace module global level |
level | Trace level intended to be logged |
fmt | Print string |
EnetTrace_TraceLevel EnetTrace_setLevel | ( | EnetTrace_TraceLevel | level | ) |
Set runtime trace level.
Set the driver's runtime travel level.
level | Trace level to be enabled |
EnetTrace_TraceLevel EnetTrace_getLevel | ( | void | ) |
Get runtime trace level.
Get the driver's runtime travel level.
EnetTrace_TraceLevel gEnetTrace_runtimeLevel |
Enabled runtime trace level.