Print Debug feature. More...
|
Defines | |
| #define | FLAG_SHORT_SUPPORTED |
| whether short type is supported | |
Enumerations | |
| enum | { S_COPY, S_PERCENT, S_FLAGS, S_WIDTH, S_DOT, S_PRECIS, S_SIZE, S_TYPE, S_MAX } |
States values. | |
| enum | { C_OTHER, C_PERCENT, C_DOT, C_ZERO, C_DIGIT, C_FLAG, C_SIZE, C_TYPE, C_MAX } |
character type values | |
| enum | { FLAG_SHORT = (1 << 0), FLAG_LONG = (1 << 1), FLAG_SIGNED = (1 << 2), FLAG_SIGN = (1 << 3), FLAG_SIGN_SPACE = (1 << 4), FLAG_LEFT = (1 << 5), FLAG_LEAD_ZERO = (1 << 6), FLAG_NEGATIVE = (1 << 7) } |
field_flags used to store the format information | |
Functions | |
| static uint32_t | type_get (char c) |
| Function to read a particular character and map its type. | |
| void | dbg_test_print (const char *fmt,...) |
| Function formatting a string and sending it to the defined output. | |
Variables | |
| static const uint8_t | transition_table [S_MAX][C_MAX] |
| Transition table. | |
| static const char | hex_upper_table [] = "0123456789ABCDEF" |
| Upper case hexadecimal table. | |
Debug Print definitions | |
|
| |
| enum | dbg_mod_tag { DBG_MOD_IDX_KE = 0, DBG_MOD_IDX_DBG, DBG_MOD_IDX_IPC, DBG_MOD_IDX_DMA, DBG_MOD_IDX_MM, DBG_MOD_IDX_TX, DBG_MOD_IDX_RX, DBG_MOD_IDX_PHY, DBG_MOD_IDX_MAX } |
Module filtering macros, used only by debug module. More... | |
| enum | dbg_sev_tag { DBG_SEV_IDX_NONE = 0, DBG_SEV_IDX_CRT, DBG_SEV_IDX_ERR, DBG_SEV_IDX_WRN, DBG_SEV_IDX_INF, DBG_SEV_IDX_VRB, DBG_SEV_IDX_MAX, DBG_SEV_ALL } |
Severity filtering macros, used only by debug module. More... | |
| uint32_t | dbg_snprintf (char *buffer, uint32_t size, const char *fmt,...) |
| Execute a pseudo snprintf function. | |
| uint32_t | dbg_vsnprintf_offset (char *buffer, uint32_t size, uint32_t offset, const char *fmt, va_list args) |
| Execute a pseudo vsnprintf function. | |
| #define | NX_PRINT_NONE 0 |
| All print macro are discarded. | |
| #define | NX_PRINT_IPC 1 |
| Print are sent to IPC. | |
| #define | NX_PRINT_PRINTF 2 |
| Print are sent to standard printf. | |
| #define | NX_PRINT_PRINTK 3 |
| Print are sent to Linux printk. | |
| #define | D_KE "\x80" |
| Prefix for Kernel. | |
| #define | D_DBG "\x81" |
| Prefix for DBG. | |
| #define | D_IPC "\x82" |
| Prefix for IPC. | |
| #define | D_DMA "\x83" |
| Prefix for DMA. | |
| #define | D_MM "\x84" |
| Prefix for LMAC management. | |
| #define | D_TX "\x85" |
| Prefix for Tx path. | |
| #define | D_RX "\x86" |
| Prefix for Rx path. | |
| #define | D_PHY "\x87" |
| Prefix for Modem / RF. | |
| #define | D_XX0 "\x88" |
| Prefix unused. | |
| #define | D_XX1 "\x89" |
| Prefix unused. | |
| #define | D_XX2 "\x8A" |
| Prefix unused. | |
| #define | D_XX3 "\x8B" |
| Prefix unused. | |
| #define | D_XX4 "\x8C" |
| Prefix unused. | |
| #define | D_CRT "\x9A" |
| Prefix for critical. | |
| #define | D_ERR "\x9B" |
| Prefix for error. | |
| #define | D_WRN "\x9C" |
| Prefix for warning. | |
| #define | D_INF "\x9D" |
| Prefix for info. | |
| #define | D_VRB "\x9E" |
| Prefix for verbose debug. | |
| #define | DBG_MOD_MIN 0x80 |
| All print macro are discarded. | |
| #define | DBG_MOD_MAX (DBG_MOD_MIN + DBG_MOD_IDX_MAX) |
| All print macro are discarded. | |
| #define | DBG_MOD_ALL 0xFFFFFFFF |
| All print macro are discarded. | |
| #define | DBG_SEV_MIN 0x9A |
| All print macro are discarded. | |
| #define | DBG_SEV_MAX 0xA0 |
| All print macro are discarded. | |
| #define | dbg(fmt,...) do {} while (0) |
| All print macro are discarded. | |
| #define | dbg_vsnprintf(buffer, size, fmt, args) dbg_vsnprintf_offset(buffer, size, 0, fmt, args) |
| Execute a pseudo vsnprintf function. | |
Print Debug feature.
| #define dbg_vsnprintf | ( | buffer, | |||
| size, | |||||
| fmt, | |||||
| args | ) | dbg_vsnprintf_offset(buffer, size, 0, fmt, args) |
Execute a pseudo vsnprintf function.
| [out] | buffer | Output buffer |
| [in] | size | Size of the output buffer |
| [in] | fmt | Format string |
| [in] | args | Variable list of arguments |
Definition at line 154 of file dbg.h.
Referenced by dbg_snprintf().
| enum dbg_mod_tag |
Module filtering macros, used only by debug module.
| enum dbg_sev_tag |
Severity filtering macros, used only by debug module.
| uint32_t dbg_snprintf | ( | char * | buffer, | |
| uint32_t | size, | |||
| const char * | fmt, | |||
| ... | ||||
| ) |
Execute a pseudo snprintf function.
| [out] | buffer | Output buffer |
| [in] | size | Size of the output buffer |
| [in] | fmt | Format string |
Definition at line 718 of file dbg_print.c.
References dbg_vsnprintf.
| void dbg_test_print | ( | const char * | fmt, | |
| ... | ||||
| ) |
Function formatting a string and sending it to the defined output.
| [in] | fmt | Format string |
Definition at line 647 of file dbg_print.c.
References ASSERT_ERR, CO_BIT, dbg_env, DBG_MOD_MAX, DBG_MOD_MIN, DBG_SEV_IDX_ERR, DBG_SEV_MAX, DBG_SEV_MIN, debug_env_tag::filter_module, and debug_env_tag::filter_severity.
| uint32_t dbg_vsnprintf_offset | ( | char * | buffer, | |
| uint32_t | size, | |||
| uint32_t | offset, | |||
| const char * | fmt, | |||
| va_list | args | |||
| ) |
Execute a pseudo vsnprintf function.
| [out] | buffer | Output buffer |
| [in] | size | Size of the output buffer |
| [in] | offset | Offset of final string at which the writing in buffer should start |
| [in] | fmt | Format string |
| [in] | args | Variable list of arguments |
Definition at line 201 of file dbg_print.c.
References ASSERT_ERR, co_min(), and type_get().
| static uint32_t type_get | ( | char | c | ) | [static] |
Function to read a particular character and map its type.
This function is called to read a particular character and fetch its type
| [in] | c | Input character |
Definition at line 120 of file dbg_print.c.
Referenced by dbg_vsnprintf_offset().
const uint8_t transition_table[S_MAX][C_MAX] [static] |
{
{ S_COPY, S_PERCENT, S_COPY, S_COPY, S_COPY, S_COPY, S_COPY, S_COPY },
{ S_COPY, S_COPY, S_DOT, S_FLAGS , S_WIDTH, S_FLAGS , S_SIZE, S_TYPE },
{ S_COPY, S_COPY, S_DOT, S_FLAGS, S_WIDTH, S_FLAGS, S_SIZE, S_TYPE },
{ S_COPY, S_COPY, S_DOT, S_WIDTH, S_WIDTH, S_COPY, S_SIZE, S_TYPE },
{ S_COPY, S_COPY, S_COPY, S_PRECIS, S_PRECIS, S_COPY, S_SIZE, S_TYPE },
{ S_COPY, S_COPY, S_COPY, S_PRECIS, S_PRECIS, S_COPY, S_SIZE, S_TYPE },
{ S_COPY, S_COPY, S_COPY, S_COPY, S_COPY, S_COPY, S_COPY, S_TYPE },
{ S_COPY, S_PERCENT, S_COPY, S_COPY, S_COPY, S_COPY, S_COPY, S_COPY },
}
Transition table.
Definition at line 87 of file dbg_print.c.
1.6.1