Skip to content

Create New Driver-Specific Error Type #5

@Ctru14

Description

@Ctru14

See conversation in #4 about the return type for the Accel self-test:

          Instead of returning an option we should return an error type defined by this driver:

Result<(f32, f32, f32), Driver::Error>. Having a result already present an invalid case of returning an error instead of a valid value. Adding an option on top of that just seems unnecessary

We can map any internal i2c error to a Driver::Error and just use the ? operator to pass the error up.

Please create an issue to follow up on this, thanks!

Originally posted by @jerrysxie in #4 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions