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
Not sure if the pwm_pin_capture_cycles_async() function will be useful to anybody. I do not have a use for it, but since this is how other asynchronous Zephyr RTOS APIs are done, I have added it for completeness.
Alternatives
PWM capture could also be implemented as a sensor driver, but seeing that many PWM controllers allow channels/pins to be used for PWM generation while others are used for PWM capture, it would be difficult to share the device between these two functions.
The Linux kernel PWM subsystem allows for PWM controllers to provide a capture function as well.
The text was updated successfully, but these errors were encountered:
Extend the PWM API with optional API functions for capturing PWM pulse
width and period cycles.
Fixeszephyrproject-rtos#26026.
Signed-off-by: Henrik Brix Andersen <[email protected]>
Extend the PWM API with optional API functions for capturing PWM pulse
width and period cycles.
Fixes#26026.
Signed-off-by: Henrik Brix Andersen <[email protected]>
Introduction
Extend the Zephyr RTOS PWM API with functions for capturing PWM pulse width and period time.
Problem description
Many PWM controllers supports capturing PWM pulse width and period time/frequency, but Zephyr currently lacks an API for exposing this functionality.
Proposed change
Add two API functions for capturing the PWM pulse width and period:
pwm_pin_capture_cycles()
pwm_pin_capture_cycles_async()
Detailed RFC
Proposed change (Detailed)
Please see PR #26025 for proposed API.
Dependencies
None.
Concerns and Unresolved Questions
Not sure if the
pwm_pin_capture_cycles_async()
function will be useful to anybody. I do not have a use for it, but since this is how other asynchronous Zephyr RTOS APIs are done, I have added it for completeness.Alternatives
PWM capture could also be implemented as a sensor driver, but seeing that many PWM controllers allow channels/pins to be used for PWM generation while others are used for PWM capture, it would be difficult to share the device between these two functions.
The Linux kernel PWM subsystem allows for PWM controllers to provide a capture function as well.
The text was updated successfully, but these errors were encountered: