Several parts of the cxd56-hal have a pure math calculation (frequencies, etc.) that have been incorrectly calculated before and could be validated via tests. Extract the pure math components of the these kinds of functions and write tests for them. These include
cxd56-hal/src/pwm.rs:95 compute_param_phase
cxd56-hal/src/timer.rs:171 compute_load
cxd56-hal/src/watchdog.rs:73 timeout_to_load
cxd56-hal/src/spi.rs:650 baud_divisors
Several parts of the
cxd56-halhave a pure math calculation (frequencies, etc.) that have been incorrectly calculated before and could be validated via tests. Extract the pure math components of the these kinds of functions and write tests for them. These includecxd56-hal/src/pwm.rs:95 compute_param_phasecxd56-hal/src/timer.rs:171 compute_loadcxd56-hal/src/watchdog.rs:73 timeout_to_loadcxd56-hal/src/spi.rs:650 baud_divisors