Skip to content

I2C support #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

I2C support #99

wants to merge 4 commits into from

Conversation

d3zd3z
Copy link
Collaborator

@d3zd3z d3zd3z commented May 23, 2025

This captures my current WIP i2c support.

d3zd3z added 4 commits May 22, 2025 16:12
Make some small changes to try testing this on stm32.  This change can
be discarded.

Signed-off-by: David Brown <[email protected]>
Upgrade the DT entries to use the new syntax.

Signed-off-by: David Brown <[email protected]>

/// A single Sqe.
///
/// TODO: How to bind the lifetime to the Rtio meaningfully, even though it is all static.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acquire can return sqe bound the lifetime of the context (which is true!)

}

/// A single Cqe.
pub struct Cqe {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should take a lifetime parameter, bound to the lifetime of struct rtio

alternatively, you could use the copy in/copy out functions to avoid lifetimes at all

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to think about this a bit more, as the lifetimes of Rust structures are fairly uncorrelated with associated lifetimes in the C world. Specifically, the Rust lifetimes indicate constraints on what is allowed to happen in the Rust world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants