aboutsummaryrefslogtreecommitdiff
path: root/pw_sys_io
diff options
context:
space:
mode:
Diffstat (limited to 'pw_sys_io')
-rw-r--r--pw_sys_io/public/pw_sys_io/sys_io.h11
1 files changed, 10 insertions, 1 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 5973579fc..477c71967 100644
--- a/pw_sys_io/public/pw_sys_io/sys_io.h
+++ b/pw_sys_io/public/pw_sys_io/sys_io.h
@@ -51,9 +51,18 @@ namespace pw::sys_io {
// This function will block until it either succeeds or fails to read a byte
// from the pw_sys_io backend.
//
-// Returns Status::Ok() if a byte was successfully read.
+// Returns Status::Ok() - A byte was successfully read.
+// Status::ResourceExhausted() - if the underlying source vanished.
Status ReadByte(std::byte* dest);
+// Read a single byte from the sys io backend, if available.
+// Implemented by: Backend
+//
+// Returns Status::Ok() - A byte was successfully read, and is in dest.
+// Status::Unavailable() - No byte is available to read; try later.
+// Status::Unimplemented() - Not supported on this target.
+Status TryReadByte(std::byte* dest);
+
// Write a single byte out the sys io backend.
// Implemented by: Backend
//