diff options
Diffstat (limited to 'vusb/sendchar_usart.c')
| -rw-r--r-- | vusb/sendchar_usart.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vusb/sendchar_usart.c b/vusb/sendchar_usart.c new file mode 100644 index 000000000..d6f3c894c --- /dev/null +++ b/vusb/sendchar_usart.c | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #include <stdint.h> | ||
| 2 | #include "oddebug.h" | ||
| 3 | #include "sendchar.h" | ||
| 4 | |||
| 5 | |||
| 6 | #if DEBUG_LEVEL > 0 | ||
| 7 | /* from oddebug.c */ | ||
| 8 | int8_t sendchar(uint8_t c) | ||
| 9 | { | ||
| 10 | while(!(ODDBG_USR & (1 << ODDBG_UDRE))); /* wait for data register empty */ | ||
| 11 | ODDBG_UDR = c; | ||
| 12 | return 1; | ||
| 13 | } | ||
| 14 | #else | ||
| 15 | int8_t sendchar(uint8_t c) | ||
| 16 | { | ||
| 17 | return 1; | ||
| 18 | } | ||
| 19 | #endif | ||
