Skip to content
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

Restructuring minireq for flexibility #20

Merged
merged 3 commits into from
Jun 20, 2024
Merged

Conversation

ryan-summers
Copy link
Member

This PR removes the storage of actual function pointers from minireq. The generated API was too restrictive in that every handler had to have the same signature. It also made it impossible to use two lockable RTIC resources as the context.

With this approach, the user is responsible for routing to the appropriate handler, but they can make the signature of the handler whatever they would like.

This is in support of quartiq/booster#406, where one of the command handlers needs both the flash interface of Booster as well as the I2C bus interface, which are both separate, lockable RTIC resources.

tests/integration.rs Outdated Show resolved Hide resolved
@jordens jordens merged commit ab28a95 into main Jun 20, 2024
7 checks passed
@jordens jordens deleted the feature/default-handler branch June 20, 2024 15:30
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