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 311B

12345678910111213141516171819
  1. #include <stdint.h>
  2. #include "oddebug.h"
  3. #include "sendchar.h"
  4. #if DEBUG_LEVEL > 0
  5. /* from oddebug.c */
  6. int8_t sendchar(uint8_t c)
  7. {
  8. while(!(ODDBG_USR & (1 << ODDBG_UDRE))); /* wait for data register empty */
  9. ODDBG_UDR = c;
  10. return 1;
  11. }
  12. #else
  13. int8_t sendchar(uint8_t c)
  14. {
  15. return 1;
  16. }
  17. #endif