-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
can : move bytes2dlc/dlc2bytes to common header file #14759
base: master
Are you sure you want to change the base?
Conversation
only keep can_bytes2dlc & can_dlc2bytes Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
[Experimental Bot, please feedback here] No, this PR does not fully meet the NuttX requirements. While it mentions keeping Specifically, it's missing:
To make this PR acceptable, the author needs to:
Only then will the PR meet the NuttX requirements. |
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.
why not put common code in a separate header like include/nuttx/can_cmn.h
. We shouldn't couple CAN chardev headers with SocketCAN headers. These are two separate implementations
'include nuttx/can_cmn.h' is ok |
@xucheng5 I think it should be flexible enough to let some less common usage scenarios: i.e.: it could be possible to use the internal CAN peripheral from a MCU with SocketCAN and an external MCP2515 with CAN char dev. Using global variables shared by both will introduce issues to this case of use. I think your modifications are fine, but we need to test these usage case to confirm everything still working fine. |
only keep can_bytes2dlc & can_dlc2bytes
Note: Please adhere to Contributing Guidelines.
Summary
Update this section with information on why change is necessary,
what it exactly does and how, if new feature shows up, provide
references (dependencies, similar problems and solutions), etc.
Impact
Update this section, where applicable, on how change affects users,
build process, hardware, documentation, security, compatibility, etc.
Testing
Update this section with details on how did you verify the change,
what Host was used for build (OS, CPU, compiler, ..), what Target was
used for verification (arch, board:config, ..), etc. Providing build
and runtime logs from before and after change is highly appreciated.