console.h 441 B

1234567891011121314151617181920
  1. #ifndef CONSOLE_H
  2. #define CONSOLE_H
  3. #include "compiler.h"
  4. #include "io.h"
  5. #define CON_FLOW_CTL 0 /* Block on output full? */
  6. void con_putc(char c);
  7. void con_puts(const char *);
  8. void __fmt_printf(1,0) con_vprintf(const char *, va_list);
  9. void __fmt_printf(1,2) con_printf(const char *, ...);
  10. static __always_inline void con_flush(void)
  11. {
  12. while (CON_FLOW_CTL && !(CON_STATUS & CON_STATUS_TX_EMPTY))
  13. pause();
  14. }
  15. #endif /* CONSOLE_H */