Module error

Source
Expand description

§Zephyr errors

This module contains an Error and Result type for use in wrapped Zephyr calls. Many operations in Zephyr return an int result where negative values correspond with errnos. Convert those to a Result type where the Error condition maps to errnos.

Initially, this will just simply wrap the numeric error code, but it might make sense to make this an enum itself, however, it would probably be better to auto-generate this enum instead of trying to maintain the list manually.

Structs§

Error
A Zephyr error.

Functions§

to_result
Map a return result from Zephyr into an Result.
to_result_void
Map a return result, with a void result.

Type Aliases§

Result
Wraps a value with a possible Zephyr error.