diff options
Diffstat (limited to 'protocol/vusb/sendchar_usart.c')
| -rw-r--r-- | protocol/vusb/sendchar_usart.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/protocol/vusb/sendchar_usart.c b/protocol/vusb/sendchar_usart.c new file mode 100644 index 000000000..8d24f87d1 --- /dev/null +++ b/protocol/vusb/sendchar_usart.c | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH | ||
| 3 | * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) | ||
| 4 | */ | ||
| 5 | #include <stdint.h> | ||
| 6 | #include "oddebug.h" | ||
| 7 | #include "sendchar.h" | ||
| 8 | |||
| 9 | |||
| 10 | #if DEBUG_LEVEL > 0 | ||
| 11 | /* from oddebug.c */ | ||
| 12 | int8_t sendchar(uint8_t c) | ||
| 13 | { | ||
| 14 | while(!(ODDBG_USR & (1 << ODDBG_UDRE))); /* wait for data register empty */ | ||
| 15 | ODDBG_UDR = c; | ||
| 16 | return 1; | ||
| 17 | } | ||
| 18 | #else | ||
| 19 | int8_t sendchar(uint8_t c) | ||
| 20 | { | ||
| 21 | return 1; | ||
| 22 | } | ||
| 23 | #endif | ||
