Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sendchar_usart.c 472B

1234567891011121314151617181920212223
  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. #if DEBUG_LEVEL > 0
  9. /* from oddebug.c */
  10. int8_t sendchar(uint8_t c)
  11. {
  12. while(!(ODDBG_USR & (1 << ODDBG_UDRE))); /* wait for data register empty */
  13. ODDBG_UDR = c;
  14. return 1;
  15. }
  16. #else
  17. int8_t sendchar(uint8_t c)
  18. {
  19. return 1;
  20. }
  21. #endif