2011-01-15 22:06:48 +00:00
|
|
|
#if DBG > 0
|
|
|
|
/* set LED pin high/low at the start/end of an ISR */
|
2011-01-16 09:44:48 +00:00
|
|
|
#define DBG_ISR_BEGIN() PORTB |= (1<<PB0)
|
|
|
|
#define DBG_ISR_END() PORTB &= ~(1<<PB0)
|
2011-01-15 22:06:48 +00:00
|
|
|
|
|
|
|
/* Set PB1=OC1A as output pin and toggle this pin on TIMER1 compare match */
|
2011-01-16 09:44:48 +00:00
|
|
|
#define DBG_OC1A_TOGGLE() DDRB |= (1<<DDB1); \
|
|
|
|
TCCR1A |= 1<<COM1A0
|
|
|
|
|
|
|
|
#define DBG_LED_ON() /* nothing */
|
|
|
|
#define DBG_LED_OFF() /* nothing */
|
2011-01-15 22:06:48 +00:00
|
|
|
#else
|
2011-01-16 09:44:48 +00:00
|
|
|
#define DBG_ISR_BEGIN() /* nothing */
|
|
|
|
#define DBG_ISR_END() /* nothing */
|
|
|
|
#define DBG_OC1A_TOGGLE() /* nothing */
|
2011-01-15 22:06:48 +00:00
|
|
|
|
2011-01-16 09:44:48 +00:00
|
|
|
/* LED behaviour in non-debugging mode */
|
|
|
|
#define DBG_LED_ON() PORTB &= ~(1<<PB0)
|
|
|
|
#define DBG_LED_OFF() PORTB |= (1<<PB0)
|
|
|
|
#endif
|