Lines Matching full:period
54 /** PWM pin capture captures period. */
60 /** PWM pin capture captures both period and pulse width. */
64 /** PWM pin capture captures a single period/pulse width. */
67 /** PWM pin capture captures period/pulse width continuously. */
87 * the PWM device), the PWM signal period in nanoseconds and the flags
103 /** Period in nanoseconds. */
104 uint32_t period; member
135 * // .period = 1000,
143 * a channel, a period in nanoseconds and optionally flags.
157 .period = DT_PWMS_PERIOD_BY_NAME(node_id, name), \
241 * // .period = 2000,
249 * a channel, a period in nanoseconds and optionally flags.
262 .period = DT_PWMS_PERIOD_BY_IDX(node_id, idx), \
383 * @param period_cycles Captured PWM period width (in clock cycles). HW
399 * @brief PWM driver API call to configure PWM pin period and pulse width.
450 * @brief Set the period and pulse width for a single PWM output.
452 * The PWM period and pulse width will synchronously be set to the new values
457 * PWM period and pulse width. Depending on the hardware, changing the PWM
458 * period and/or pulse width may cause a glitch in the generated PWM signal.
460 * @note Some multi-channel PWM controllers share the PWM period across all
461 * channels. Depending on the hardware, changing the PWM period for one channel
462 * may affect the PWM period for the other channels of the same PWM controller.
466 * Passing a non-zero @p pulse equal to @p period will cause the pin
471 * @param period Period (in clock cycles) set to the PWM. HW specific.
476 * @retval -EINVAL If pulse > period.
480 uint32_t period, uint32_t pulse,
484 uint32_t channel, uint32_t period, in z_impl_pwm_set_cycles() argument
490 if (pulse > period) { in z_impl_pwm_set_cycles()
494 return api->set_cycles(dev, channel, period, pulse, flags); in z_impl_pwm_set_cycles()
522 * @brief Set the period and pulse width in nanoseconds for a single PWM output.
529 * @param period Period (in nanoseconds) set to the PWM.
534 * @retval -ENOTSUP If requested period or pulse cycles are not supported.
538 uint32_t period, uint32_t pulse, pwm_flags_t flags) in pwm_set() argument
550 period_cycles = (period * cycles_per_sec) / NSEC_PER_SEC; in pwm_set()
565 * @brief Set the period and pulse width in nanoseconds from a struct
566 * pwm_dt_spec (with custom period).
570 * pwm_set(spec->dev, spec->channel, period, pulse, spec->flags)
572 * The period specified in @p spec is ignored. This API call can be used when
573 * the period specified in Devicetree needs to be changed at runtime.
576 * @param period Period (in nanoseconds) set to the PWM.
583 static inline int pwm_set_dt(const struct pwm_dt_spec *spec, uint32_t period, in pwm_set_dt() argument
586 return pwm_set(spec->dev, spec->channel, period, pulse, spec->flags); in pwm_set_dt()
590 * @brief Set the period and pulse width in nanoseconds from a struct
595 * pwm_set(spec->dev, spec->channel, spec->period, pulse, spec->flags)
607 return pwm_set(spec->dev, spec->channel, spec->period, pulse, in pwm_set_pulse_dt()
679 * @brief Configure PWM period/pulse width capture for a single PWM input.
724 * @brief Enable PWM period/pulse width capture for a single PWM input.
759 * @brief Disable PWM period/pulse width capture for a single PWM input.
790 * @brief Capture a single PWM period/pulse width in clock cycles for a single
804 * @param[out] period Pointer to the memory to store the captured PWM period
808 * @param timeout Waiting period for the capture to complete.
812 * @retval -EAGAIN Waiting period timed out.
817 pwm_flags_t flags, uint32_t *period,
821 * @brief Capture a single PWM period/pulse width in microseconds for a single
835 * @param[out] period Pointer to the memory to store the captured PWM period
839 * @param timeout Waiting period for the capture to complete.
843 * @retval -EAGAIN Waiting period timed out.
849 pwm_flags_t flags, uint64_t *period, in pwm_capture_usec() argument
862 err = pwm_cycles_to_usec(dev, channel, period_cycles, period); in pwm_capture_usec()
876 * @brief Capture a single PWM period/pulse width in nanoseconds for a single
890 * @param[out] period Pointer to the memory to store the captured PWM period
894 * @param timeout Waiting period for the capture to complete.
898 * @retval -EAGAIN Waiting period timed out.
904 pwm_flags_t flags, uint64_t *period, in pwm_capture_nsec() argument
917 err = pwm_cycles_to_nsec(dev, channel, period_cycles, period); in pwm_capture_nsec()