Home
last modified time | relevance | path

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

/Zephyr-latest/samples/basic/fade_led/src/
Dmain.c24 uint32_t pulse_width = 0U; in main() local
38 ret = pwm_set_pulse_dt(&pwm_led0, pulse_width); in main()
43 printk("Using pulse width %d%%\n", 100 * pulse_width / pwm_led0.period); in main()
46 pulse_width += step; in main()
47 if (pulse_width >= pwm_led0.period) { in main()
48 pulse_width = pwm_led0.period - step; in main()
52 if (pulse_width >= step) { in main()
53 pulse_width -= step; in main()
55 pulse_width = step; in main()
/Zephyr-latest/samples/basic/servo_motor/src/
Dmain.c29 uint32_t pulse_width = min_pulse; in main() local
41 ret = pwm_set_pulse_dt(&servo, pulse_width); in main()
48 if (pulse_width <= min_pulse) { in main()
50 pulse_width = min_pulse; in main()
52 pulse_width -= STEP; in main()
55 pulse_width += STEP; in main()
57 if (pulse_width >= max_pulse) { in main()
59 pulse_width = max_pulse; in main()