-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add method to check if bus is dominant #51
Conversation
6607507
to
76f4aa2
Compare
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.
Nice!
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.
Looks good, nice addition 👍
Just rebase this PR with the latest HEAD and I'll approve this one as well and get a release going for mcan/0.6.0
.
There is an option for rebasing here on Github, if you want you can try it out so we can see how well it works.
Checking if the bus is dominant (i.e., the RX pin value is low) can be particularly useful in scenarios where the transceiver is put into sleep mode. Some transceivers (such as TCAN1043-Q1[1]) signals wake-up by setting the RX pin (and nFAULT) to low while being in sleep mode. To accurately tell if the transceiver requests a wake-up, the RX pin state needs to be accessible from the application. Fortunately MCAN exposes a way to read the state of the RX pin through its `TEST` register. Extend the `DynAux` trait with an additional method that reads the `RX` bit from that register. [1]: https://www.ti.com/product/TCAN1043-Q1
76f4aa2
to
5236fd3
Compare
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.
Nice! Approved 👍
- Add method to check if bus is dominant (GrepitAB#51)
### Added - Add method to check if bus is dominant (#51)
Checking if the bus is dominant (i.e., the RX pin value is low) can be particularly useful in scenarios where the transceiver is put into sleep mode. Some transceivers (such as TCAN1043-Q11) signals wake-up by setting the RX pin (and nFAULT) to low while being in sleep mode. To accurately tell if the transceiver requests a wake-up, the RX pin state needs to be accessible from the application.
Fortunately MCAN exposes a way to read the state of the RX pin through its
TEST
register. Extend theDynAux
trait with an additional method that reads theRX
bit from that register.Thank you!
Thank you for your contribution.
Please make sure that your submission includes the following:
Must
errors
orwarnings
.cargo +stable fmt
was run.cargo +stable clippy
yields nowarnings
.CHANGELOG.md
in the proper section.newly added features and code.