summaryrefslogtreecommitdiff
path: root/vusb/sendchar_usart.c
diff options
context:
space:
mode:
Diffstat (limited to 'vusb/sendchar_usart.c')
-rw-r--r--vusb/sendchar_usart.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/vusb/sendchar_usart.c b/vusb/sendchar_usart.c
new file mode 100644
index 0000000000..d6f3c894c4
--- /dev/null
+++ b/vusb/sendchar_usart.c
@@ -0,0 +1,19 @@
+#include <stdint.h>
+#include "oddebug.h"
+#include "sendchar.h"
+
+
+#if DEBUG_LEVEL > 0
+/* from oddebug.c */
+int8_t sendchar(uint8_t c)
+{
+ while(!(ODDBG_USR & (1 << ODDBG_UDRE))); /* wait for data register empty */
+ ODDBG_UDR = c;
+ return 1;
+}
+#else
+int8_t sendchar(uint8_t c)
+{
+ return 1;
+}
+#endif