Skip to content
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

Expose initialization mode #41

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Conversation

vccaedholm
Copy link
Contributor

@vccaedholm vccaedholm commented Oct 19, 2023

Added initialization_mode method to DynAux trait, to enable software support for disabling of the CAN bus.

Created a new method initialization_mode in reg, similar to configuration_mode but without setting the configuration bit. While CCCR.INIT is set, message transfer from and to the CAN bus is stopped. Setting CCCR.INIT does not change any configuration register.

Exposed the initialization mode by adding the initialization_mode function to the DynAux trait, with will implement a call to the initialization_mode method in reg.

Thank you!

Thank you for your contribution.
Please make sure that your submission includes the following:

Must

  • The code compiles without errors or warnings.
  • All tests pass and in the best case you also added new tests.
  • cargo +stable fmt was run.
  • cargo +stable clippy yields no warnings.
  • Your changes were added to the CHANGELOG.md in the proper section.
  • You add a description of your work to this PR.
  • You added proper docs (in code, rustdoc and README.md) for your
    newly added features and code.

@vccaedholm vccaedholm requested a review from a team as a code owner October 19, 2023 12:31
@Ironedde Ironedde self-assigned this Oct 20, 2023
@Ironedde Ironedde self-requested a review October 20, 2023 13:23
@Ironedde
Copy link
Contributor

LGTM, but we should probably merge in #42 to silence the warnings for this patch.

I'll rebase your change once that is in.

nilfit
nilfit previously requested changes Oct 21, 2023
Copy link
Contributor

@nilfit nilfit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good addtion, thanks!

mcan/CHANGELOG.md Outdated Show resolved Hide resolved
@glaeqen
Copy link
Contributor

glaeqen commented Oct 22, 2023

👍🏻

vccaedholm and others added 2 commits October 23, 2023 17:12
Added initialization_mode method to DynAux trait, to enable software
support for disabling of the CAN bus.
Add PR number to the changelog

Co-authored-by: Nils Fitinghoff <[email protected]>
@Ironedde
Copy link
Contributor

I rebased the branch, the clippy test should now pass.

@Ironedde Ironedde dismissed nilfit’s stale review October 24, 2023 07:12

Reference has been added to the changelog.

Copy link
Contributor

@Ironedde Ironedde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased and ready 👍

@Ironedde Ironedde merged commit 60bd364 into GrepitAB:master Oct 24, 2023
5 checks passed
@vccaedholm vccaedholm deleted the expose_init_mode branch October 24, 2023 07:43
@Ironedde Ironedde mentioned this pull request Oct 24, 2023
7 tasks
Ironedde pushed a commit to Ironedde/mcan-clone that referenced this pull request Oct 24, 2023
- Added
 - Add `Can::aux::initialization_mode` (GrepitAB#41)

- Changed
 - Fix some issues with watermark sizes for Rx FIFOs and Tx Event FIFO (GrepitAB#43)
 - Adhere to `filter_map_bool_then` clippy lint (GrepitAB#42)
@Ironedde Ironedde mentioned this pull request Oct 24, 2023
Ironedde pushed a commit to Ironedde/mcan-clone that referenced this pull request Oct 24, 2023
- Added
 - Add `Can::aux::initialization_mode` (GrepitAB#41)

- Changed
 - Fix some issues with watermark sizes for Rx FIFOs and Tx Event FIFO (GrepitAB#43)
 - Adhere to `filter_map_bool_then` clippy lint (GrepitAB#42)
Ironedde added a commit that referenced this pull request Oct 24, 2023
### Added
 - Add `Can::aux::initialization_mode` (#41)

### Changed
- Fix some issues with watermark sizes for Rx FIFOs and Tx Event FIFO
(#43)
 - Adhere to `filter_map_bool_then` clippy lint (#42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants