diff options
author | tmk <nobody@nowhere> | 2011-05-07 00:04:18 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-05-07 00:48:18 +0900 |
commit | 61e12a3157ea6860f23bf8e29372aa70aeb02be0 (patch) | |
tree | b93de00a8deb10713eec89edfb315d5b447201d6 /vusb/sendchar_usart.c | |
parent | a6b31e950fe8de3dc4888e2f90a4001a6caee483 (diff) |
move files: main_vusb.c ps2_usart.c sendchar_usart.c from ps2_usb to common dir
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 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 |