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
Right now, digital writes are implemented via IoPin.digitalWrite(), but setting a pin's PWM value is done by making a call to the HardwareScheduler.queuePwm(). This makes sense, because hardware PWM is not always possible. But it makes it necessary to pass a reference to the HardwareScheduler to any function that might need to use PWM, which is both impractical and awkward.
So, it would make more sense to implement IoPin.pwmWrite() and have it relay to PrimitiveIoPin.pwmWrite(), which can either implement it directly, or the developer can give their platform's HardwareScheduler a static method for scheduling pwm & use that.
The text was updated successfully, but these errors were encountered:
Right now, digital writes are implemented via
IoPin.digitalWrite()
, but setting a pin's PWM value is done by making a call to theHardwareScheduler.queuePwm()
. This makes sense, because hardware PWM is not always possible. But it makes it necessary to pass a reference to the HardwareScheduler to any function that might need to use PWM, which is both impractical and awkward.So, it would make more sense to implement
IoPin.pwmWrite()
and have it relay toPrimitiveIoPin.pwmWrite()
, which can either implement it directly, or the developer can give their platform's HardwareScheduler a static method for scheduling pwm & use that.The text was updated successfully, but these errors were encountered: