table of contents
other versions
PWM_GET_RELATIVE_DUT(9) | Pulse-Width Modulation (PWM) | PWM_GET_RELATIVE_DUT(9) |
NAME¶
pwm_get_relative_duty_cycle - Get a relative duty cycle value
SYNOPSIS¶
unsigned int pwm_get_relative_duty_cycle(const struct pwm_state * state, unsigned int scale);
ARGUMENTS¶
state
PWM state to extract the duty cycle from
scale
target scale of the relative duty cycle
DESCRIPTION¶
This functions converts the absolute duty cycle stored in state (expressed in nanosecond) into a value relative to the period.
For example if you want to get the duty_cycle expressed in percent, call:
pwm_get_state(pwm, state); duty = pwm_get_relative_duty_cycle(state, 100);
COPYRIGHT¶
January 2017 | Kernel Hackers Manual 4.8. |