#define KDBG_WRITE_CHAR(c) _kdebug_bitbang_putchar((c))
#define KDBG_MASK_IRQ(old) do { IRQ_SAVE_DISABLE((old)); } while(0)
#define KDBG_RESTORE_IRQ(old) do { IRQ_RESTORE((old)); } while(0)
#define KDBG_WRITE_CHAR(c) _kdebug_bitbang_putchar((c))
#define KDBG_MASK_IRQ(old) do { IRQ_SAVE_DISABLE((old)); } while(0)
#define KDBG_RESTORE_IRQ(old) do { IRQ_RESTORE((old)); } while(0)
/**
* Putchar for BITBANG serial debug console.
* Sometimes, we can't permit to use a whole serial for debugging purpose.
/**
* Putchar for BITBANG serial debug console.
* Sometimes, we can't permit to use a whole serial for debugging purpose.
* This is achieved by this simple function, that shift out the data like a UART, but
* in software :)
* The only requirement is that SER_BITBANG_* macros will be defined somewhere (usually hw_ser.h)
* This is achieved by this simple function, that shift out the data like a UART, but
* in software :)
* The only requirement is that SER_BITBANG_* macros will be defined somewhere (usually hw_ser.h)
#if CONFIG_KDEBUG_PORT == 0
UBRR0H = (uint8_t)(period>>8);
UBRR0L = (uint8_t)period;
#if CONFIG_KDEBUG_PORT == 0
UBRR0H = (uint8_t)(period>>8);
UBRR0L = (uint8_t)period;