diff options
| author | Sean Cross <sean@xobs.io> | 2023-12-29 19:05:57 +0800 |
|---|---|---|
| committer | Sean Cross <sean@xobs.io> | 2024-01-13 09:38:42 -0800 |
| commit | 99b06594a8fc0bbfa2fe86ee3a31c71bf8586166 (patch) | |
| tree | c3ab759e5ce622cb027cf52440fb65226685fbaa /library/std/src/os | |
| parent | aa738606282c38194fefc06b7bbf7e0b5d26400e (diff) | |
| download | rust-99b06594a8fc0bbfa2fe86ee3a31c71bf8586166.tar.gz rust-99b06594a8fc0bbfa2fe86ee3a31c71bf8586166.zip | |
std: xous: use constants for stdout and stderr
Use constants for the opcodes when writing to stdout or stderr. There still is no stdin operation. Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'library/std/src/os')
| -rw-r--r-- | library/std/src/os/xous/services/log.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/library/std/src/os/xous/services/log.rs b/library/std/src/os/xous/services/log.rs index e6bae929eac..55a501dc7d0 100644 --- a/library/std/src/os/xous/services/log.rs +++ b/library/std/src/os/xous/services/log.rs @@ -45,6 +45,17 @@ impl<'a> Into<[usize; 5]> for LogScalar<'a> { } } +pub(crate) enum LogLend { + StandardOutput = 1, + StandardError = 2, +} + +impl Into<usize> for LogLend { + fn into(self) -> usize { + self as usize + } +} + /// Return a `Connection` to the log server, which is used for printing messages to /// the console and reporting panics. If the log server has not yet started, this /// will block until the server is running. It is safe to call this multiple times, |
