Fix CH32V203 I2C slave lowering - #73
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes CH32V203 I2C slave initialization and refines generated Embassy I2C support, including an async master bus-idle wait improvement, while simplifying the I2C master/slave hardware smoke binaries (with the slave smoke now reporting observed register/value pairs over USB CDC).
Changes:
- Update generated async I2C master helpers to await bus-idle using the async wait mechanism (instead of a blocking spin wait).
- Correct CH32V203 I2C slave init semantics/order (PE before ACK) and adjust own-address ADD0 handling in evidence + generated HAL.
- Simplify I2C master/slave smoke binaries; slave smoke now streams received register/value pairs over CDC.
Reviewed changes
Copilot reviewed 2 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Updates Embassy I2C codegen for async bus-idle waiting; strengthens generator output assertions. |
| evidence/wch/ch32v203g6u6/hair.json | Adjusts semantic operation descriptions for slave init ordering and ADD0 handling. |
| evidence/wch/ch32v203g6u6/generated/embassy/src/i2c.rs | Regenerated Embassy I2C HAL reflecting async bus-idle waits and corrected slave init/address behavior. |
| evidence/wch/ch32v203g6u6/generated/embassy-i2c-slave-slave-smoke/src/main.rs | Reworks slave smoke to use USB CDC logging and ISR-captured register/value reporting. |
| evidence/wch/ch32v203g6u6/generated/embassy-i2c-slave-slave-smoke/Cargo.toml | Adds USB + heapless deps needed for CDC logging in the slave smoke. |
| evidence/wch/ch32v203g6u6/generated/embassy-i2c-slave-slave-smoke/Cargo.lock | Lockfile updates for new slave smoke dependencies. |
| evidence/wch/ch32v203g6u6/generated/embassy-i2c-slave-master-smoke/src/main.rs | Simplifies master smoke to periodically send an I2C request (no USB logging). |
| evidence/wch/ch32v203g6u6/generated/embassy-i2c-slave-master-smoke/Cargo.toml | Removes USB-related deps/features from master smoke. |
| evidence/wch/ch32v203g6u6/generated/embassy-i2c-slave-master-smoke/Cargo.lock | Lockfile updates reflecting removed master smoke dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation