BetterStream.cpp 405 B

123456789101112131415161718192021
  1. #include "BetterStream.h"
  2. #include "print_vprintf.h"
  3. void AP_HAL::BetterStream::printf(const char *fmt, ...)
  4. {
  5. va_list ap;
  6. va_start(ap, fmt);
  7. vprintf(fmt, ap);
  8. va_end(ap);
  9. }
  10. void AP_HAL::BetterStream::vprintf(const char *fmt, va_list ap)
  11. {
  12. print_vprintf(this, fmt, ap);
  13. }
  14. size_t AP_HAL::BetterStream::write(const char *str)
  15. {
  16. return write((const uint8_t *)str, strlen(str));
  17. }