fix: restore ARES USB UART callback transport#32
Merged
Conversation
|
👋 感谢您的贡献! 请确保:
详细的贡献指南请参考 CONTRIBUTING.md |
ttwards
marked this pull request as ready for review
July 7, 2026 17:01
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.
描述
恢复之前在 USB/UART 传输层完成但被后续分支重写覆盖掉的 ARES callback transport 改动,并补上 native_sim ztest 覆盖通讯链路。
主要内容:
AresInterfaceAPI.send_with_callback()、ares_interface_tx_done_cb_t、caps()和mtu()。send_with_lock()恢复为 TX done callback 语义,同时保留后续 master 中的 composite USB class 注册和 diagnostics 修正。chosen { ares,uart = ...; }选择。req_id的问题,改为完整 16-bit。-Wmissing-braces构建失败。send_with_lock文档残留。tests/native_sim/ares_communication,覆盖 bind/init、interface callback 成功/失败、SYNC flush/in-flight、callback capability 缺失、SYNC RX、FUNC request、REPL callback、packet/byte parser 路径和 disconnect 清理。改动类型
相关 Issue
无。
测试
本地验证:
/Users/ttwards/Documents/zephyr_ws/.venv/bin/pre-commit run --files $(git diff --name-only origin/master..HEAD)west build -b dm_mc02 samples/communication/ares_communication --pristine,使用恢复 worktree 作为 Zephyr modulewest build -b dm_mc02 samples/communication/ares_communication --pristine,额外启用CONFIG_UART_INTERFACE=y并叠加dm_mc02_usart1_921600.overlayZEPHYR_TOOLCHAIN_VARIANT=host python3 /Users/ttwards/Documents/zephyr_ws/zephyr/scripts/twister -T tests/native_sim/ares_communication --platform native_sim/native/64 --inline-logs --outdir /tmp/twister_ares_communication_lima -x=ZEPHYR_MODULES=/Users/ttwards/Documents/zephyr_ws/mambo-restore-usb-uart,9/9 ztest cases passed检查清单
截图/日志
不适用。
其他说明
没有重新刷写硬件。