+#if CONFIG_KDEBUG_PORT == 666
+ /**
+ * Putchar for BITBANG serial debug console.
+ * Sometimes, we can't permit to use a whole serial for debugging purpose.
+ * Since debug console is in output only it is usefull to a single generic I/O pin for debug.
+ * 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)
+ * \note All interrupts are disabled during debug prints!
+ */
+ static void _kdebug_bitbang_putchar(char c)
+ {
+ int i;
+
+ /* Start bit */
+ SER_BITBANG_LOW;
+ _kdebug_bitbang_delay();
+
+ /* Shift out data */
+ for (i = 0; i < 8; i++)
+ {
+ if (c & BV(i))
+ SER_BITBANG_HIGH;
+ else
+ SER_BITBANG_LOW;
+ _kdebug_bitbang_delay();
+ }
+
+ /* Stop bit */
+ SER_BITBANG_HIGH;
+ _kdebug_bitbang_delay();
+ }
+#endif
+
+
+