diff options
Diffstat (limited to 'pw_sys_io')
-rw-r--r-- | pw_sys_io/public/pw_sys_io/sys_io.h | 10 | ||||
-rw-r--r-- | pw_sys_io/sys_io.cc | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pw_sys_io/public/pw_sys_io/sys_io.h b/pw_sys_io/public/pw_sys_io/sys_io.h index 3010de1ff..5f545b316 100644 --- a/pw_sys_io/public/pw_sys_io/sys_io.h +++ b/pw_sys_io/public/pw_sys_io/sys_io.h @@ -37,9 +37,9 @@ #include <cstddef> #include <cstring> +#include <span> #include <string_view> -#include "pw_span/span.h" #include "pw_status/status.h" #include "pw_status/status_with_size.h" @@ -75,7 +75,7 @@ Status WriteByte(std::byte b); // are returned as part of the StatusWithSize. StatusWithSize WriteLine(const std::string_view& s); -// Fill a byte span from the sys io backend using ReadByte(). +// Fill a byte std::span from the sys io backend using ReadByte(). // Implemented by: Facade // // This function is implemented by this facade and simply uses ReadByte() to @@ -87,9 +87,9 @@ StatusWithSize WriteLine(const std::string_view& s); // Return status is Status::OK if the destination span was successfully filled. // In all cases, the number of bytes successuflly read to the destination span // are returned as part of the StatusWithSize. -StatusWithSize ReadBytes(span<std::byte> dest); +StatusWithSize ReadBytes(std::span<std::byte> dest); -// Write span of bytes out the sys io backend using WriteByte(). +// Write std::span of bytes out the sys io backend using WriteByte(). // Implemented by: Facade // // This function is implemented by this facade and simply writes the source @@ -101,6 +101,6 @@ StatusWithSize ReadBytes(span<std::byte> dest); // Return status is Status::OK if all the bytes from the source span were // successfully written. In all cases, the number of bytes successfully written // are returned as part of the StatusWithSize. -StatusWithSize WriteBytes(span<const std::byte> src); +StatusWithSize WriteBytes(std::span<const std::byte> src); } // namespace pw::sys_io diff --git a/pw_sys_io/sys_io.cc b/pw_sys_io/sys_io.cc index ed0ab5c5a..8e013c3b2 100644 --- a/pw_sys_io/sys_io.cc +++ b/pw_sys_io/sys_io.cc @@ -16,7 +16,7 @@ namespace pw::sys_io { -StatusWithSize ReadBytes(span<std::byte> dest) { +StatusWithSize ReadBytes(std::span<std::byte> dest) { for (size_t i = 0; i < dest.size_bytes(); ++i) { Status result = ReadByte(&dest[i]); if (!result.ok()) { @@ -26,7 +26,7 @@ StatusWithSize ReadBytes(span<std::byte> dest) { return StatusWithSize(dest.size_bytes()); } -StatusWithSize WriteBytes(span<const std::byte> src) { +StatusWithSize WriteBytes(std::span<const std::byte> src) { for (size_t i = 0; i < src.size_bytes(); ++i) { Status result = WriteByte(src[i]); if (!result.ok()) { |