Lines Matching refs:PCA9685_COUNTER_RANGE
52 #define PCA9685_COUNTER_RANGE 4096
144 } else if (duty >= PCA9685_COUNTER_RANGE) {
160 on = channel * PCA9685_COUNTER_RANGE / PCA9685_MAXCHAN;
164 off = (on + duty) % PCA9685_COUNTER_RANGE;
193 return PCA9685_COUNTER_RANGE;
207 return (off - on) & (PCA9685_COUNTER_RANGE - 1);
271 pca9685_pwm_set_duty(chip, offset, value ? PCA9685_COUNTER_RANGE : 0);
378 PCA9685_COUNTER_RANGE * 1000) - 1;
413 duty = PCA9685_COUNTER_RANGE * state->duty_cycle;
451 state->period = (PCA9685_COUNTER_RANGE * 1000 / PCA9685_OSC_CLOCK_MHZ) *
469 state->duty_cycle = DIV_ROUND_DOWN_ULL(duty * state->period, PCA9685_COUNTER_RANGE);