Lines Matching refs:tcmpb
118 uint32_t tcon, tcntb, tcmpb;
122 tcmpb = PWM_READ(sc, TCMPB(timer->timer_index));
126 conf->duty_cycle = (u_int)(((uint64_t)tcmpb * 1000000000) / sc->sc_clkfreq);
136 uint32_t tcon, tcntb, tcmpb;
146 tcmpb = conf->duty_cycle / (1000000000 / sc->sc_clkfreq);
147 if (tcmpb == 0)
148 tcmpb = 1;
149 tcmpb = tcntb - tcmpb;
152 PWM_WRITE(sc, TCMPB(timer->timer_index), tcmpb - 1);