| pwm_get_relative_duty_cycle(9) - phpMan
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
Kernel Hackers Manual 4.8. January 2017 PWM_GET_RELATIVE_DUT(9)
|