drivers: pwm: add API for capturing pwm pulse width and period

Extend the PWM API with optional API functions for capturing PWM pulse
width and period cycles.

Fixes #26026.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2020-06-06 21:38:38 +02:00 committed by Carles Cufí
commit 77b8440fd1
7 changed files with 555 additions and 3 deletions

View file

@ -9,8 +9,8 @@
/**
* @name PWM polarity flags
* The `PWM_POLARITY_*` flags are used with pwm_pin_set_cycles(),
* pwm_pin_set_usec(), or pwm_pin_set_nsec() to specify the polarity
* of a PWM pin.
* pwm_pin_set_usec(), pwm_pin_set_nsec() or pwm_pin_configure_capture() to
* specify the polarity of a PWM pin.
* @{
*/
/** PWM pin normal polarity (active-high pulse). */