Lines Matching defs:state
47 const struct pwm_state *state)
52 if (!state->enabled) {
63 if (state->period > (0xffff << 3) * 1000)
66 period = state->period;
68 if (state->duty_cycle > period)
71 duty_cycle = state->duty_cycle;
97 if (state->polarity == PWM_POLARITY_INVERSED)
107 struct pwm_state *state)
117 state->period = (period << pwmc0_clk) * NSEC_PER_USEC;
118 state->duty_cycle = (duty << pwmc0_clk) * NSEC_PER_USEC;
120 state->polarity = PWM_POLARITY_INVERSED;
122 state->polarity = PWM_POLARITY_NORMAL;
124 state->enabled = true;