Replies: 2 comments
-
|
Here a high level AI summary as base for discussions. This is only meant as a quick overview, we should definitely use the official USB spec to implement this crate instead of AI summaries. A It would not implement USB-PD, PDO negotiation, alt modes, e-marker discovery, or PD role swaps. ScopeThe crate should cover:
Shared logicAll modes need common CC-pin classification logic. Given the state of CC1 and CC2, the crate should decide whether the port sees:
This shared classifier is the core primitive used by all state machines. Source state machineA source presents Abstract flow: Behavior:
Sink state machineA sink presents Abstract flow: Behavior:
Dual-role state machineA DRP alternates between source and sink presentation until a partner is found. Abstract flow: Once attached, it behaves exactly like the corresponding source or sink state machine. Try.SRC / Try.SNKFor preferred-role devices, the crate should also model biased DRP behavior.
These are still CC-only behaviors; they should not imply USB-PD role swaps. Error recoveryAll modes should share an error recovery path for impossible, unsafe, or failed states. Examples:
Error recovery should return the port to a safe unattached state. SummaryAt a high level, the crate is a timer-driven Type-C CC connection manager containing: The output of the crate should be abstract attach-state decisions such as role, orientation, current limit, VCONN requirement, attached/detached state, and error state. |
Beta Was this translation helpful? Give feedback.
-
@elagil I don't think it would have to change, I think its existing driver is fully compatible with what we need. So we can implement a cc driver just like usb-pd. So the flow will probably be: initial cc handshake and role discovery using usb-cc, then once connected handover to usb-pd. Once disconnected, back to usb-cc. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
See #47 (comment)
Beta Was this translation helpful? Give feedback.
All reactions