This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
[PWM] Error thrown when set pulsewidth before period #359
Comments
My conclusion looking at the Zephyr API was it's not good to set these things separately because you're in an invalid state in between. They agreed and changed their API based on my suggestions. So hopefully we can follow suit. @zolkis may be interested, I am afraid I'm not digging in at the moment to see what it's like in the new APIs currently. |
grgustaf
added a commit
to grgustaf/zephyr.js-1
that referenced
this issue
Mar 28, 2017
This is a wise API choice because you can go through invalid states by setting the wrong one first, where the pulse width is bigger than the period. I convinced Zephyr itself to make this change, but we hadn't gotten around to reflecting this in our own API. Fixes intel#359. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
This is addressed by #928. Now the APIs require you to set period and pulseWidth at the same time. If pulseWidth is greater than period, they throw an error immediately. |
jimmy-huang
pushed a commit
that referenced
this issue
Mar 30, 2017
This is a wise API choice because you can go through invalid states by setting the wrong one first, where the pulse width is bigger than the period. I convinced Zephyr itself to make this change, but we hadn't gotten around to reflecting this in our own API. Fixes #359. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It work well.
error message:
zjs_pwm_set: pulseWidth was greater than period
The text was updated successfully, but these errors were encountered: