ucpd: Add "attached" state callback for CC state changes - #3868
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e3c2faed4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Hardware-in-the-loop (HIL) Test ReportNo HIL run for this push (no affected boards, or hardware testing did not run). |
Size Difference ReportBecause TinyUSB code size varies by port and configuration, the metrics below represent the averaged totals across all example builds. Note: If there is no change, only one value is shown. Changes >1% in size
Changes <1% in sizeNo entries. No changes
Scoped compare: 2 (board, example) pairs across b_g474e_dpow1, b_u585i_iot2a. |
|
| target | .text | .rodata | .data | .bss | total | % diff |
|---|---|---|---|---|---|---|
| b_g474e_dpow1/power_delivery | 13,912 → 13,960 (+48) | — | — | — | 14,856 → 14,904 (+48) | +0.3% |
| b_u585i_iot2a/power_delivery | 21,104 → 21,152 (+48) | — | — | — | 22,336 → 22,384 (+48) | +0.2% |
…onnected->connected or connected->disconnected
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
This is a simple change to define a new callback in the USB-C sink implementation, so that the user application can know when attach state of the cable changes. This was needed in my application to track PD events.