projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
host_to_net(16|32)(), net_to_host(16|32)(): New functions.
[bertos.git]
/
drv
/
kdebug.c
diff --git
a/drv/kdebug.c
b/drv/kdebug.c
index ee09a74732d5f7b30c5e73d3b3ef0595cdf8a843..27e365116552155a5a85789215fd0f4e4a621eb2 100755
(executable)
--- a/
drv/kdebug.c
+++ b/
drv/kdebug.c
@@
-15,6
+15,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.24 2005/04/12 01:36:37 bernie
+ *#* Add hack to enable TX line at module initialization.
+ *#*
+ *#* Revision 1.23 2005/04/11 19:10:27 bernie
+ *#* Include top-level headers from cfg/ subdir.
+ *#*
*#* Revision 1.22 2005/02/18 11:18:33 bernie
*#* Fixes for Harvard processors from project_ks.
*#*
*#* Revision 1.22 2005/02/18 11:18:33 bernie
*#* Fixes for Harvard processors from project_ks.
*#*
@@
-28,10
+34,10
@@
*#* Rename UNUSED() to UNUSED_ARG().
*#*/
*#* Rename UNUSED() to UNUSED_ARG().
*#*/
-#include <debug.h>
-#include <cpu.h>
-#include <macros.h> /* for BV() */
-#include <config.h>
+#include <
cfg/
debug.h>
+#include <c
fg/c
pu.h>
+#include <
cfg/
macros.h> /* for BV() */
+#include <c
fg/c
onfig.h>
#include <hw.h>
#include <mware/formatwr.h> /* for _formatted_write() */
#include <hw.h>
#include <mware/formatwr.h> /* for _formatted_write() */
@@
-64,9
+70,16
@@
/*
* Support for special bus policies or external transceivers
* on UART0 (to be overridden in "hw.h").
/*
* Support for special bus policies or external transceivers
* on UART0 (to be overridden in "hw.h").
+ *
+ * HACK: if we don't set TXEN, kdbg disables the transmitter
+ * after each output statement until the serial driver
+ * is initialized. These glitches confuse the debug
+ * terminal that ends up printing some trash.
*/
#ifndef KDBG_UART0_BUS_INIT
*/
#ifndef KDBG_UART0_BUS_INIT
- #define KDBG_UART0_BUS_INIT do {} while (0)
+ #define KDBG_UART0_BUS_INIT do { \
+ UCSR0B = BV(TXEN); \
+ } while (0)
#endif
#ifndef KDBG_UART0_BUS_RX
#define KDBG_UART0_BUS_RX do {} while (0)
#endif
#ifndef KDBG_UART0_BUS_RX
#define KDBG_UART0_BUS_RX do {} while (0)
@@
-120,9
+133,16
@@
/*
* Support for special bus policies or external transceivers
* on UART1 (to be overridden in "hw.h").
/*
* Support for special bus policies or external transceivers
* on UART1 (to be overridden in "hw.h").
+ *
+ * HACK: if we don't set TXEN, kdbg disables the transmitter
+ * after each output statement until the serial driver
+ * is initialized. These glitches confuse the debug
+ * terminal that ends up printing some trash.
*/
#ifndef KDBG_UART1_BUS_INIT
*/
#ifndef KDBG_UART1_BUS_INIT
- #define KDBG_UART1_BUS_INIT do {} while (0)
+ #define KDBG_UART1_BUS_INIT do { \
+ UCSR1B = BV(TXEN); \
+ } while (0)
#endif
#ifndef KDBG_UART1_BUS_RX
#define KDBG_UART1_BUS_RX do {} while (0)
#endif
#ifndef KDBG_UART1_BUS_RX
#define KDBG_UART1_BUS_RX do {} while (0)