sta-core/src/debug/printing/printable_printf.cpp

31 lines
624 B
C++

#include <sta/debug/printing/printable_printf.hpp>
#include <sta/debug/assert.hpp>
#include <sta/lang.hpp>
#include <cstdio>
namespace sta
{
PrintablePrintf::PrintablePrintf()
{
}
void PrintablePrintf::print(const char * str, size_t length, bool newline /* = false */)
{
STA_ASSERT(str != nullptr);
STA_ASSERT(length > 0);
printf("%.*s", length, str);
printf("\r\n");
}
void PrintablePrintf::read(uint8_t * str, size_t length)
{
STA_ASSERT(str != nullptr);
STA_ASSERT(length > 0);
STA_NOT_IMPLEMENTED();
}
} // namespace sta