Go to the documentation of this file.
19 #include "dev_config.h"
25 #error "Cannot debug using UART without having one"
32 #define DBG_C(x) uart_putc(x)
33 #define DBG_S(x) uart_puts(x)
34 #define DBG_P(x) uart_puts_P(x)
35 #define DBG_P_(x) uart_puts_p(x)
36 #define DBG_N(x) uart_puthex_nibble(x)
37 #define DBG_W(x) uart_puthex_word(x)
38 #define DBG_X(x) uart_puthex_byte_(x)
39 #define DBG_NL() uart_putc('\n')
44 #error "Cannot use two debug methods concurrently"
47 #error "Cannot debug using console without having one"
51 #define DBG_C(x) console_putc(x)
52 #define DBG_S(x) console_puts(x)
53 #define DBG_P(x) console_puts_P(x)
54 #define DBG_P_(x) console_puts_p(x)
55 #define DBG_N(x) console_puthex_nibble(x)
56 #define DBG_W(x) console_puthex_word(x)
57 #define DBG_X(x) console_puthex_byte_(x)
58 #define DBG_NL() console_putc('\n')
64 #define DBG_C(x) do { } while(0)
65 #define DBG_S(x) do { } while(0)
66 #define DBG_P(x) do { } while(0)
67 #define DBG_P_(x) do { } while(0)
68 #define DBG_N(x) do { } while(0)
69 #define DBG_W(x) do { } while(0)
70 #define DBG_X(x) do { } while(0)
71 #define DBG_NL() do { } while(0)
76 #if defined(HAVE_DBG_PORT) && !defined(NO_DEBUG)
77 #define DBGA(x,v) do { v=(x); asm volatile("out %0,%1" :: "i"(((int)&DBGPORT)-__SFR_OFFSET),"r"(v)); } while(0)
78 #define DBG(x) do { uint8_t _x; DBGA(x,_x); } while(0)
80 #define DBG(x) do { } while(0)
81 #define DBGA(x,v) do { } while(0)
85 #if defined(HAVE_DBG_PIN) && !defined(NO_DEBUG)
86 #define DBG_ON() do { DBGPINPORT |= (1<<DBGPIN); } while(0)
87 #define DBG_OFF() do { DBGPINPORT &= ~(1<<DBGPIN); } while(0)
89 #define DBG_ON() do { } while(0)
90 #define DBG_OFF() do { } while(0)