-
Notifications
You must be signed in to change notification settings - Fork 14
feat(i2c): Add c_board I2C2 transport support #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #pragma once | ||
|
|
||
| #include <cstddef> | ||
| #include <cstdint> | ||
|
|
||
| namespace librmcs::protocol { | ||
|
|
||
| inline constexpr std::size_t kI2cDataLengthBits = 9; | ||
| inline constexpr std::uint16_t kI2cMaxDataLength = | ||
| static_cast<std::uint16_t>((1U << kI2cDataLengthBits) - 1U); | ||
|
|
||
| } // namespace librmcs::protocol |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Alliance-Algorithm/librmcs
Length of output: 410
🏁 Script executed:
Repository: Alliance-Algorithm/librmcs
Length of output: 4810
🏁 Script executed:
Repository: Alliance-Algorithm/librmcs
Length of output: 150
🏁 Script executed:
Repository: Alliance-Algorithm/librmcs
Length of output: 6532
🏁 Script executed:
Repository: Alliance-Algorithm/librmcs
Length of output: 105
🏁 Script executed:
Repository: Alliance-Algorithm/librmcs
Length of output: 604
🏁 Script executed:
Repository: Alliance-Algorithm/librmcs
Length of output: 1048
firmware/rmcs_board/app/src/usb/vendor.hpp中缺少四个 I2C 回调实现,导致构建失败。Vendor类继承自DeserializeCallback(私有继承),必须实现所有纯虚方法。firmware/c_board/app/src/usb/vendor.hpp中的实现已齐全(downlink 写操作路由到i2c0,读结果和错误帧作为仅上行数据类型被忽略)。但firmware/rmcs_board/app/src/usb/vendor.hpp缺失下述四个 override:i2c_write_deserialized_callbacki2c_read_config_deserialized_callbacki2c_read_result_deserialized_callbacki2c_error_deserialized_callbackrmcs_board 没有 I2C 硬件,这些方法应为 no-op(可参考 rmcs_board 现有的 GPIO 或加速度计回调实现),以便解除编译阻塞。
🧰 Tools
🪛 GitHub Actions: Lint
[error] 44-52: Pure virtual functions in DeserializeCallback: i2c_write_deserialized_callback, i2c_read_config_deserialized_callback, i2c_read_result_deserialized_callback, i2c_error_deserialized_callback (unimplemented by Vendor).
🤖 Prompt for AI Agents