embassy
embassy copied to clipboard
embassy-nrf::SimplePwm::set_period() is misnamed
The set_period()
routine in https://github.com/embassy-rs/embassy/blob/master/embassy-nrf/src/pwm.rs#L779 appears to be mis-named, as it's actually taking in a frequency value. Yes, technically it calculates a period from that frequency (to set the max duty cycle), but I think users would probably expect it to be named after the argument it takes, not what it does internally.
The period()
getter likewise is calculating a frequency from the max duty cycle and returning it, so probably should be frequency()
.