Lines Matching +full:sample +full:- +full:period
5 * SPDX-License-Identifier: Apache-2.0
9 * @file Sample app to demonstrate PWM.
25 uint32_t period; in main() local
29 printk("PWM-based blinky\n"); in main()
33 pwm_led0.dev->name); in main()
42 * the sample changes frequency at least once. in main()
50 "does not support a period at least %lu\n", in main()
59 period = max_period; in main()
61 ret = pwm_set_dt(&pwm_led0, period, period / 2U); in main()
66 printk("Using period %d\n", period); in main()
68 period = dir ? (period * 2U) : (period / 2U); in main()
69 if (period > max_period) { in main()
70 period = max_period / 2U; in main()
72 } else if (period < MIN_PERIOD) { in main()
73 period = MIN_PERIOD * 2U; in main()