#include <compiler.h>
#include <stdarg.h>


Go to the source code of this file.
Defines | |
| #define | dbg_vprintf_level(level, format, ap) |
| Formatted output conversion to the debug console. | |
| #define | dbg_printf_level(level,...) |
| Formatted output conversion to the debug console. | |
| #define | dbg_putstr_level(level, str) |
| Write a string to the debug console if the current debug level is higher or equal to level. | |
| #define | dbg_putchar_level(level, c) |
| Write a single character to the debug console if the current debug level is higher or equal to level. | |
| #define | dbg_vprintf(format, ap) dbg_vprintf_level(DEBUG_VERBOSE, format, ap) |
| Output formatted debug message at DEBUG_VERBOSE level. | |
| #define | dbg_printf(...) dbg_printf_level(DEBUG_VERBOSE, __VA_ARGS__) |
| Output formatted debug message at DEBUG_VERBOSE level. | |
| #define | dbg_putstr(str) dbg_putstr_level(DEBUG_VERBOSE, str) |
| Output string at DEBUG_VERBOSE level. | |
| #define | dbg_putchar(c) dbg_putchar_level(DEBUG_VERBOSE, c) |
| Output character at DEBUG_VERBOSE level. | |
| #define | dbg_panic(...) dbg_printf_level(DEBUG_PANIC, __VA_ARGS__) |
| Display a panic message. | |
| #define | dbg_error(...) dbg_printf_level(DEBUG_ERROR, __VA_ARGS__) |
| Display a error message. | |
| #define | dbg_warning(...) dbg_printf_level(DEBUG_WARNING, __VA_ARGS__) |
| Display a warning message. | |
| #define | dbg_info(...) dbg_printf_level(DEBUG_INFO, __VA_ARGS__) |
| Display an informational message. | |
| #define | dbg_verbose(...) dbg_printf_level(DEBUG_VERBOSE, __VA_ARGS__) |
| Display a verbose debugging message. | |
Enumerations | |
| enum | debug_level { DEBUG_NONE = 0, DEBUG_PANIC, DEBUG_ASSERT, DEBUG_ERROR, DEBUG_WARNING, DEBUG_INFO, DEBUG_VERBOSE } |
| Severity level of debugging messages. More... | |
Functions | |
| void | dbg_init (void) |
| Initialize the debug console. | |
| int | dbg_priv_vprintf (const char *format, va_list ap) |
| Formatted output conversion to the debug console. | |
| int int | dbg_priv_putstr (const char *str) |
| Write a string to the debug console. | |
| int | dbg_priv_putchar (int c) |
| Write a single character to the debug console. | |
| static int | dbg_priv_retzero (void) |
This is a simple debug console which can be used to dump information over a serial line when debugging a new application or driver.
Definition in file debug.h.
| #define dbg_error | ( | ... | ) | dbg_printf_level(DEBUG_ERROR, __VA_ARGS__) |
Display a error message.
Definition at line 198 of file debug.h.
Referenced by journal_clean_last_entry(), sdmmc_cd_init(), and sdmmc_mcihost_load_data().
| #define dbg_info | ( | ... | ) | dbg_printf_level(DEBUG_INFO, __VA_ARGS__) |
Display an informational message.
Definition at line 210 of file debug.h.
Referenced by watchdog_set_timeout().
| #define dbg_panic | ( | ... | ) | dbg_printf_level(DEBUG_PANIC, __VA_ARGS__) |
Display a panic message.
Definition at line 192 of file debug.h.
Referenced by do_unknown_exception(), and sdmmc_mcihost_init().
| #define dbg_printf | ( | ... | ) | dbg_printf_level(DEBUG_VERBOSE, __VA_ARGS__) |
Output formatted debug message at DEBUG_VERBOSE level.
Definition at line 173 of file debug.h.
Referenced by mem_pool_init(), sdmmc_decode_mmc_cid(), sdmmc_decode_mmc_csd(), sdmmc_decode_sd_csd(), sdmmc_mcihost_init(), udc_ep0_send_status(), udc_ep_clear_halt(), udc_ep_clear_wedge(), udc_ep_create(), udc_ep_destroy(), udc_ep_flush(), udc_ep_set_halt(), udc_ep_set_wedge(), udc_lib_process_setup_request(), usb_func_add_config(), usb_func_add_interface(), usb_func_get_descriptor(), usb_func_get_interface(), usb_func_process_setup_request(), usb_func_reset(), usb_func_set_configuration(), usb_func_set_interface(), usb_req_free_all(), usbb_enter_device_mode(), usbb_udc_configure_ep(), usbb_udc_dma_interrupt(), usbb_udc_softirq(), usbb_udc_submit_in_queue(), usbb_udc_submit_out_queue(), usbb_udc_vbus_off(), and usbb_udc_vbus_on().
| #define dbg_printf_level | ( | level, | |||
| ... | ) |
Value:
(dbg_priv_check_level(level) \
? dbg_priv_printf(__VA_ARGS__) \
: dbg_priv_retzero())
Produce output according to format on the debug console if the current debug level is higher or equal to level. format is interpreted as a regular printf()-style format string with a few limitations (some specifiers are accepted but ignored.)
| level | Debug level at which to show the message | |
| ... | Format specification and arguments |
| #define dbg_putchar | ( | c | ) | dbg_putchar_level(DEBUG_VERBOSE, c) |
| #define dbg_putchar_level | ( | level, | |||
| c | ) |
Value:
(dbg_priv_check_level(level) \
? dbg_priv_putchar(c) \
: dbg_priv_retzero())
| level | Debug level at which to show the character | |
| c | The character to write. |
| #define dbg_putstr | ( | str | ) | dbg_putstr_level(DEBUG_VERBOSE, str) |
| #define dbg_putstr_level | ( | level, | |||
| str | ) |
Value:
(dbg_priv_check_level(level) \
? dbg_priv_putstr(str) \
: dbg_priv_retzero())
| level | Debug level at which to show the string | |
| str | NUL-terminated string. |
| #define dbg_verbose | ( | ... | ) | dbg_printf_level(DEBUG_VERBOSE, __VA_ARGS__) |
Display a verbose debugging message.
Definition at line 216 of file debug.h.
Referenced by aesblk_prepare_req(), msc_do_read(), msc_queue_empty(), msc_read_worker(), msc_submit_read_buffers(), msc_submit_write_data_req(), msc_write_worker(), sdmmc_mcihost_load_data(), sdmmc_slot_set_voltage(), and usbb_udc_dma_interrupt().
| #define dbg_vprintf | ( | format, | |||
| ap | ) | dbg_vprintf_level(DEBUG_VERBOSE, format, ap) |
| #define dbg_vprintf_level | ( | level, | |||
| format, | |||||
| ap | ) |
Value:
(dbg_priv_check_level(level) \
? dbg_priv_vprintf(format, ap) \
: dbg_priv_retzero())
Produce output according to format on the debug console if the current debug level is higher or equal to level. format is interpreted as a regular printf()-style format string with a few limitations (some specifiers are accepted but ignored.)
| level | Debug level at which to show the message | |
| format | Format specification. | |
| ap | Format arguments. |
| #define dbg_warning | ( | ... | ) | dbg_printf_level(DEBUG_WARNING, __VA_ARGS__) |
Display a warning message.
Definition at line 204 of file debug.h.
Referenced by block_alloc_request(), and journal_init().
| enum debug_level |
Severity level of debugging messages.
| void dbg_init | ( | void | ) |
Initialize the debug console.
This function must be called before any of the other debug console functions may be called. If the debug console is disabled, this function does nothing.
Definition at line 130 of file debug.c.
References debug_console, serial_console_init(), and SERIAL_ENABLE_TX.

| int dbg_priv_putchar | ( | int | c | ) |
Write a single character to the debug console.
For internal use only.
| c | The character to write. |
Definition at line 118 of file debug.c.
References console_putchar(), and debug_console.

| int int dbg_priv_putstr | ( | const char * | str | ) |
Write a string to the debug console.
For internal use only.
| str | NUL-terminated string. |
Definition at line 105 of file debug.c.
References console_putstr(), and debug_console.

| static int dbg_priv_retzero | ( | void | ) | [inline, static] |
| int dbg_priv_vprintf | ( | const char * | format, | |
| va_list | ap | |||
| ) |
Formatted output conversion to the debug console.
For internal use only.
Produce output according to format on the debug console. format is interpreted as a regular printf()-style format string with a few limitations (some specifiers are accepted but ignored.)
| format | Format specification. | |
| ap | Format arguments. |
Definition at line 68 of file debug.c.
References console_vprintf(), and debug_console.
Referenced by dbg_priv_printf().

1.5.8