Lines Matching full:period
30 * cycle at max. period count.
58 static int set_period_and_pulse(const struct pwm_cc13xx_cc26xx_config *config, uint32_t period, in set_period_and_pulse() argument
68 match_value = period + 1; in set_period_and_pulse()
71 /* Fail if period is out of range */ in set_period_and_pulse()
72 if ((period > PWM_COUNT_MAX) || (period == 0)) { in set_period_and_pulse()
73 LOG_ERR("Period (%d) is out of range.", period); in set_period_and_pulse()
77 /* Compare to new period and fail if invalid */ in set_period_and_pulse()
78 if (period < (match_value - 1) || (match_value < 0)) { in set_period_and_pulse()
79 LOG_ERR("Period (%d) is shorter than pulse (%d).", period, pulse); in set_period_and_pulse()
83 /* Store new period and update timer */ in set_period_and_pulse()
84 write_value(config, period, GPT_O_TBPR, GPT_O_TBILR); in set_period_and_pulse()
94 LOG_DBG("Period and pulse successfully set."); in set_period_and_pulse()
98 static int set_cycles(const struct device *dev, uint32_t channel, uint32_t period, uint32_t pulse, in set_cycles() argument
113 set_period_and_pulse(config, period, pulse); in set_cycles()