Lines Matching refs:PCA9685_COUNTER_RANGE
53 #define PCA9685_COUNTER_RANGE 4096 macro
144 } else if (duty >= PCA9685_COUNTER_RANGE) { in pca9685_pwm_set_duty()
160 on = channel * PCA9685_COUNTER_RANGE / PCA9685_MAXCHAN; in pca9685_pwm_set_duty()
164 off = (on + duty) % PCA9685_COUNTER_RANGE; in pca9685_pwm_set_duty()
193 return PCA9685_COUNTER_RANGE; in pca9685_pwm_get_duty()
207 return (off - on) & (PCA9685_COUNTER_RANGE - 1); in pca9685_pwm_get_duty()
270 pca9685_pwm_set_duty(pca, offset, value ? PCA9685_COUNTER_RANGE : 0); in pca9685_pwm_gpio_set()
374 PCA9685_COUNTER_RANGE * 1000) - 1; in __pca9685_pwm_apply()
409 duty = PCA9685_COUNTER_RANGE * state->duty_cycle; in __pca9685_pwm_apply()
448 state->period = (PCA9685_COUNTER_RANGE * 1000 / PCA9685_OSC_CLOCK_MHZ) * in pca9685_pwm_get_state()
466 state->duty_cycle = DIV_ROUND_DOWN_ULL(duty * state->period, PCA9685_COUNTER_RANGE); in pca9685_pwm_get_state()