Home
last modified time | relevance | path

Searched refs:period_ns (Results 1 – 2 of 2) sorted by relevance

/AliOS-Things-master/hardware/chip/haas1000/aos_driver/pwm/
A Dpwm.c45 int haas1000_pwm_out_config(haas1000_pwm_t *pwm, uint32_t channel, uint32_t period_ns, in haas1000_pwm_out_config() argument
57 if (period_ns == 0) { in haas1000_pwm_out_config()
60 cfg.freq = DIV_ROUND_CLOSEST(NS_PER_SEC, period_ns); in haas1000_pwm_out_config()
61 cfg.ratio = DIV_ROUND_CLOSEST(((uint64_t)pulse_width_ns) * 100, period_ns); in haas1000_pwm_out_config()
/AliOS-Things-master/hardware/chip/rtl872xd/aos_driver/pwm/
A Dpwm.c85 static int rtl872xd_pwm_out_config(rtl872xd_pwm_t *pwm_dev, uint32_t channel, uint32_t period_ns, in rtl872xd_pwm_out_config() argument
111 tmp = DIV_ROUND_CLOSEST(((uint64_t)period_ns * 40), 1000); in rtl872xd_pwm_out_config()
117 prescaler = DIV_ROUND_CLOSEST(((uint64_t)period_ns * 40), 1000); in rtl872xd_pwm_out_config()
131 arr = DIV_ROUND_CLOSEST(((uint64_t)period_ns * 40), 1000); in rtl872xd_pwm_out_config()
137 ccrx = DIV_ROUND_CLOSEST(((uint64_t)(period_ns - pulse_width_ns) * 40), 1000); in rtl872xd_pwm_out_config()

Completed in 4 milliseconds