You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Pwm trait is cumbersome to implement in a driver like the PCA9685 driver due to the try_set_period and try_get_period methods, which depend on knowledge of the "real-world" frequency on which everything is running.
This can even be an external input and thus subject to external change plus configurable through a prescaler or power configuration and so on.
Even when solving this (e.g. by having the user provide the value directly), in the try_set_period implementation the driver will need to calculate an approximation to a combination of prescaler and/or other configs. This may be possible but I feel this is something that the driver user would rather determine themselves so that the authoritatively provided frequency is followed exactly.
Additionally, choosing a Time type seems difficult because of precision and conversion issues.
The text was updated successfully, but these errors were encountered:
The
Pwm
trait is cumbersome to implement in a driver like the PCA9685 driver due to thetry_set_period
andtry_get_period
methods, which depend on knowledge of the "real-world" frequency on which everything is running.This can even be an external input and thus subject to external change plus configurable through a prescaler or power configuration and so on.
Even when solving this (e.g. by having the user provide the value directly), in the
try_set_period
implementation the driver will need to calculate an approximation to a combination of prescaler and/or other configs. This may be possible but I feel this is something that the driver user would rather determine themselves so that the authoritatively provided frequency is followed exactly.Additionally, choosing a
Time
type seems difficult because of precision and conversion issues.The text was updated successfully, but these errors were encountered: