use span in uart interface

This commit is contained in:
Amar Mahmutbegovic
2024-10-27 01:24:37 +02:00
parent d497339a54
commit 4400c3532f
22 changed files with 41 additions and 58 deletions

View File

@@ -4,6 +4,8 @@
#include <stdio.h>
#include <sys/stat.h>
#include <span>
namespace
{
hal::uart *uart_stdio;
@@ -26,7 +28,7 @@ extern "C" int _write(int fd, char * ptr, int len)
{
if(fd == STDOUT_FILENO || fd == STDERR_FILENO)
{
uart_stdio->write_array(ptr, len);
uart_stdio->write(std::span<const char>(ptr, len));
}
return len;