- #define KDBG_MASK_IRQ(old) do {/*nop*/} while(0)
- #define KDBG_RESTORE_IRQ() do {/*nop*/} while(0)
-#elif defined(__I196__)
- #include "Util196.h"
- #define KDBG_WAIT_READY() do {} while (!(SP_STAT & (SPSF_TX_EMPTY | SPSF_TX_INT)))
- #define KDBG_WRITE_CHAR(c) do { SBUF = (c); } while(0)
- #define KDBG_MASK_IRQ(old) \
- do { \
- (old) = INT_MASK1 & INT1F_TI; \
- INT_MASK1 &= ~INT1F_TI; \
- } while(0)
- #define KDBG_RESTORE_IRQ(old) do { INT_MASK1 |= (old); }
-#elif defined(__AVR__)
- #include <avr/io.h>
- #if CONFIG_KDEBUG_PORT == 0
- #if defined(__AVR_ATmega64__)
- #define UCR UCSR0B
- #define UDR UDR0
- #define USR UCSR0A
- #elif defined(__AVR_ATmega8__)
- #define UCR UCSRB
- #define USR UCSRA
- #endif
- #define KDBG_WAIT_READY() do { loop_until_bit_is_set(USR, UDRE); } while(0)
- #define KDBG_WRITE_CHAR(c) do { UCR |= BV(TXEN); UDR = (c); } while(0)
- #define KDBG_MASK_IRQ(old) do { (old) = UCR & BV(TXCIE); cbi(UCR, TXCIE); } while(0)
- #define KDBG_RESTORE_IRQ(old) do { UCR |= (old); } while(0)
- #elif CONFIG_KDEBUG_PORT == 1
- #define KDBG_WAIT_READY() do { loop_until_bit_is_set(UCSR1A, UDRE); } while(0)
- #define KDBG_WRITE_CHAR(c) do { UCSR1B |= BV(TXEN); UDR1 = (c); } while(0)
- #define KDBG_MASK_IRQ(old) do { (old) = UCSR1B & BV(TXCIE); cbi(UCSR1B, TXCIE); } while(0)
- #define KDBG_RESTORE_IRQ(old) do { UCSR1B |= (old); } while(0)
- #else
- #error CONFIG_KDEBUG_PORT should be either 0 or 1
+ #define KDBG_MASK_IRQ(old) do { (void)(old); } while(0)
+ #define KDBG_RESTORE_IRQ(old) do { /*nop*/ } while(0)
+ typedef char kdbg_irqsave_t; /* unused */
+
+ #define kdbg_hw_init() do {} while (0) ///< Not needed
+
+ #if CONFIG_KDEBUG_PORT == 666
+ #error BITBANG debug console missing for this platform