GrepitAB / mcan

Unofficial MCAN Hardware Abstraction Layer
Apache License 2.0
24 stars 4 forks source link

Expose initialization mode #41

Closed vccaedholm closed 1 year ago

vccaedholm commented 1 year ago

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

Ironedde commented 1 year ago

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

I'll rebase your change once that is in.

glaeqen commented 1 year ago

👍🏻

Ironedde commented 1 year ago

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