7 #include <util/delay.h>
13 #define DEBUG_LED_PIN PIN(DEBUG_LED_P)
14 #define DEBUG_LED_DDR DDR(DEBUG_LED_P)
15 #define DEBUG_LED_PORT PORT(DEBUG_LED_P)
17 #define debug_led_off() DEBUG_LED_PORT |= (1<<DEBUG_LED_I)
18 #define debug_led_on() DEBUG_LED_PORT &= (uint8_t)~(1<<DEBUG_LED_I)
19 #define debug_led_flip() DEBUG_LED_PIN |= (1<<DEBUG_LED_I)
20 #define debug_led_init() DEBUG_LED_DDR |= (1<<DEBUG_LED_I)
22 inline static void debug_led_flash(uint16_t len
,uint16_t out
) {
23 // no lead in, depend on lead out of previous call.
35 #define led_d(state) \
43 #define DEBUG_L(LEVEL) (DEBUG>=LEVEL)
46 #define dpf_P(...) printf_P(__VA_ARGS__)
47 #define dpf(...) printf(__VA_ARGS__)
53 #define dpfv(...) printf(__VA_ARGS__)
54 #define dpfv_P(...) printf_P(__VA_ARGS__)
60 #define dpfV(...) printf(__VA_ARGS__)
61 #define dpfV_P(...) printf_P(__VA_ARGS__)
67 #endif /* _DEBUG_H_ */