Add type-c traits for getting Discovered SVIDs, Discover Identity, executing Hard Reset#850
Open
tullom wants to merge 5 commits into
Open
Add type-c traits for getting Discovered SVIDs, Discover Identity, executing Hard Reset#850tullom wants to merge 5 commits into
tullom wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Mirrors PR #820 onto the v0.2.0 branch by adding port- and controller-level traits (and tps6699x driver implementations) for getting Discovered SVIDs, getting Discover Identity SOP/SOP' responses, and executing Hard Reset. Resolves issue #849.
Changes:
- Adds new
SvidDiscovery,HardReset, andDiscoverIdentitytraits at both port and controller levels intype-c-interface, plus a newDiscoveredSvidsdata type incontrol::svid. - Implements these traits for the tps6699x driver and for the std example mock controller.
- Wires up
heaplessas a new dependency oftype-c-interface(reflected in workspaceCargo.lockfiles).
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| type-c-interface/src/control/svid.rs | New DiscoveredSvids value type with fixed-capacity SOP/SOP' arrays. |
| type-c-interface/src/control/mod.rs | Registers the new svid module. |
| type-c-interface/src/controller/svid.rs | New controller-level SvidDiscovery trait. |
| type-c-interface/src/controller/hard_reset.rs | New controller-level HardReset trait. |
| type-c-interface/src/controller/discover_identity.rs | New controller-level DiscoverIdentity trait (SOP and SOP'). |
| type-c-interface/src/controller/mod.rs | Registers the three new controller modules. |
| type-c-interface/src/port/svid.rs | New port-level SvidDiscovery trait. |
| type-c-interface/src/port/hard_reset.rs | New port-level HardReset trait. |
| type-c-interface/src/port/discover_identity.rs | New port-level DiscoverIdentity trait. |
| type-c-interface/src/port/mod.rs | Registers the three new port modules. |
| type-c-interface/Cargo.toml | Adds heapless workspace dependency. |
| type-c-service/src/controller/svid.rs | Port-trait blanket impl that delegates to the controller's SvidDiscovery. |
| type-c-service/src/controller/hard_reset.rs | Port-trait blanket impl that delegates to the controller's HardReset. |
| type-c-service/src/controller/discover_identity.rs | Port-trait blanket impl delegating to the controller's DiscoverIdentity. |
| type-c-service/src/controller/mod.rs | Registers the three new service-side controller modules. |
| type-c-service/src/driver/tps6699x.rs | Concrete impls calling tps6699x driver primitives for SVID/HRST/Discover Identity. |
| examples/std/src/lib/type_c/mock_controller.rs | Mock implementations of the new traits for the std example. |
| Cargo.lock / examples/*/Cargo.lock | Lockfile updates reflecting the new heapless dependency. |
RobertZ2011
requested changes
May 18, 2026
…into main PD trait
RobertZ2011
previously approved these changes
May 18, 2026
jerrysxie
previously approved these changes
May 18, 2026
…r hard reset logging
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.
Mirrors PR #820 for v0.2.0
Resolves #849