Skip to content

zephyr: fuel-gauge: Implement blocking wrapper #26

Description

@kurtjd

What

Implement and upstream a safe, idiomatic Rust wrapper over the raw Rust bindings to the blocking fuel gauge API. This is necessary to get the base in for async support which is actually needed by the battery-service. See PoC implementation as a start.

Why

The battery-service relies on fuel gauges. To make use of Zephyr's fuel gauge drivers by the battery-service, they must be wrapped in a safe Rust API.

Out of scope

  • This should NOT include an async implementation (covered by issue zephyr: fuel-gauge: Implement async wrapper #27).
  • This should NOT include the embedded-batteries implementation as that interface is not widely accepted yet by the Rust community, and don't want to potentially block this PR because of that. This will be covered in follow-up zephyr: fuel-gauge: Implement embedded-batteries trait #28.
  • This is not dependent on any bus wrappers being available. Unlike typical Rust drivers, the user code does not need to explicitly pass a bus during driver construction. This is all handled internally by the driver behind the scenes via device tree.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions