TimingParams is split to exploit the similarities between the bit timing configuration in NBTP and DBTP. Timestamping is just moved to a separate struct for now.
The validity of the parameters in the new BitTiming struct now checked when applying them instead of on construction. This prevents public fields in the struct allowing the user to skip the checks.
The divider (now called prescaler to better match the manual) calculation is changed to remove floating point operations.
Must
[x] The code compiles without errors or warnings.
[x] All tests pass and in the best case you also added new tests.
[x] cargo +nightly fmt was run.
[x] cargo +stable clippy yields no warnings.
[ ] ~Your changes were added to the CHANGELOG.md in the proper section.~
[x] You add a description of your work to this PR.
[x] You added proper docs (in code, rustdoc and README.md) for your
newly added features and code.
TimingParams is split to exploit the similarities between the bit timing configuration in NBTP and DBTP. Timestamping is just moved to a separate struct for now.
The validity of the parameters in the new BitTiming struct now checked when applying them instead of on construction. This prevents public fields in the struct allowing the user to skip the checks.
The divider (now called
prescaler
to better match the manual) calculation is changed to remove floating point operations.Must
errors
orwarnings
.cargo +nightly fmt
was run.cargo +stable clippy
yields nowarnings
.CHANGELOG.md
in the proper section.~