mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-10 00:36:00 +00:00
Updated feedback
This commit is contained in:
parent
ebb14896b8
commit
9eddbaa30f
@ -17,7 +17,9 @@ namespace sta
|
||||
STA_ASSERT(length > 0);
|
||||
|
||||
printf("%.*s", length, str);
|
||||
printf("\r\n");
|
||||
|
||||
if (newline)
|
||||
printf("\r\n");
|
||||
}
|
||||
|
||||
void PrintablePrintf::read(uint8_t * str, size_t length)
|
||||
|
@ -19,11 +19,15 @@ namespace sta
|
||||
|
||||
void PrintableUART::print(const char * str, size_t length, bool newline /* = false */)
|
||||
{
|
||||
const char * linebreak = "\r\n";
|
||||
|
||||
intf_->acquire();
|
||||
intf_->transfer(reinterpret_cast<const uint8_t *>(str), length);
|
||||
intf_->transfer(reinterpret_cast<const uint8_t *>(linebreak), 2);
|
||||
|
||||
if (newline)
|
||||
{
|
||||
const char * linebreak = "\r\n";
|
||||
intf_->transfer(reinterpret_cast<const uint8_t *>(linebreak), 2);
|
||||
}
|
||||
|
||||
intf_->release();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user