Skip to content

zephyr: i2c-target: Implement async wrapper #32

Description

@kurtjd

What

Implement and upstream a safe, idiomatic Rust wrapper over the raw Rust bindings to the async I2C target API.

Note: The API provided by Zephyr is experimental and not widely supported due to the difficulty of making one interface for all target hardware (same issues we've run into on our town i2c target trait). The API is inherently async as it operates on callbacks (so from Rust you can register a callback that wakes a task) and there isn't really a "blocking" version.

Why

The HID I2C service relies on i2c target. To make use of Zephyr's i2c target drivers by the HID I2C service, they must be wrapped in a safe Rust API.

Out of scope

  • This should NOT include the embedded-mcu 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: i2c-target: Implement embedded-mcu trait #33.

Metadata

Metadata

Assignees

No one assigned

    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