Lines Matching full:pwm

10  * @brief Public PWM Driver APIs
17 * @brief PWM Interface
18 * @defgroup pwm_interface PWM Interface
34 #include <zephyr/dt-bindings/pwm/pwm.h>
41 * @name PWM capture configuration flags
54 /** PWM pin capture captures period. */
57 /** PWM pin capture captures pulse width. */
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. */
73 * @brief Provides a type to hold PWM configuration flags.
84 * @brief Container for PWM information specified in devicetree.
86 * This type contains a pointer to a PWM device, channel number (controlled by
87 * the PWM device), the PWM signal period in nanoseconds and the flags
88 * applicable to the channel. Note that not all PWM drivers support flags. In
99 /** PWM device instance. */
121 * pwm-names = "alpha", "beta";
142 * has the 'pwms' property, and that 'pwms' property specifies a PWM controller,
147 * the node's pwm-names property.
167 * the node's pwm-names property.
186 * the node's pwm-names property
205 * the node's pwm-names property.
248 * has the 'pwms' property, and that 'pwms' property specifies a PWM controller,
373 * @brief PWM capture callback handler function signature
377 * @note @kconfig{CONFIG_PWM_CAPTURE} must be selected to enable PWM capture
380 * @param[in] dev PWM device instance.
381 * @param channel PWM channel.
383 * @param period_cycles Captured PWM period width (in clock cycles). HW
385 * @param pulse_cycles Captured PWM pulse width (in clock cycles). HW specific.
386 * @param status Status for the PWM capture (0 if no error, negative errno
399 * @brief PWM driver API call to configure PWM pin period and pulse width.
407 * @brief PWM driver API call to obtain the PWM cycles per second (frequency).
415 * @brief PWM driver API call to configure PWM capture.
424 * @brief PWM driver API call to enable PWM capture.
430 * @brief PWM driver API call to disable PWM capture.
437 /** @brief PWM driver API definition. */
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
453 * without glitches in the PWM signal, but the call will not block for the
456 * @note Not all PWM controllers support synchronous, glitch-free updates of the
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.
469 * @param[in] dev PWM device instance.
470 * @param channel PWM channel.
471 * @param period Period (in clock cycles) set to the PWM. HW specific.
472 * @param pulse Pulse width (in clock cycles) set to the PWM. HW specific.
498 * @brief Get the clock rate (cycles per second) for a single PWM output.
500 * @param[in] dev PWM device instance.
501 * @param channel PWM channel.
522 * @brief Set the period and pulse width in nanoseconds for a single PWM output.
527 * @param[in] dev PWM device instance.
528 * @param channel PWM channel.
529 * @param period Period (in nanoseconds) set to the PWM.
530 * @param pulse Pulse width (in nanoseconds) set to the PWM.
575 * @param[in] spec PWM specification from devicetree.
576 * @param period Period (in nanoseconds) set to the PWM.
577 * @param pulse Pulse width (in nanoseconds) set to the PWM.
597 * @param[in] spec PWM specification from devicetree.
598 * @param pulse Pulse width (in nanoseconds) set to the PWM.
612 * @brief Convert from PWM cycles to microseconds.
614 * @param[in] dev PWM device instance.
615 * @param channel PWM channel.
645 * @brief Convert from PWM cycles to nanoseconds.
647 * @param[in] dev PWM device instance.
648 * @param channel PWM channel.
679 * @brief Configure PWM period/pulse width capture for a single PWM input.
681 * After configuring PWM capture using this function, the capture can be
693 * @param[in] dev PWM device instance.
694 * @param channel PWM channel.
695 * @param flags PWM capture flags
701 * @retval -ENOSYS if PWM capture is not supported or the given flags are not
704 * @retval -EBUSY if PWM capture is already in progress
724 * @brief Enable PWM period/pulse width capture for a single PWM input.
726 * The PWM pin must be configured using pwm_configure_capture() prior to
732 * @param[in] dev PWM device instance.
733 * @param channel PWM channel.
737 * @retval -ENOSYS if PWM capture is not supported
738 * @retval -EIO if IO error occurred while enabling PWM capture
739 * @retval -EBUSY if PWM capture is already in progress
759 * @brief Disable PWM period/pulse width capture for a single PWM input.
764 * @param[in] dev PWM device instance.
765 * @param channel PWM channel.
769 * @retval -ENOSYS if PWM capture is not supported
770 * @retval -EIO if IO error occurred while disabling PWM capture
790 * @brief Capture a single PWM period/pulse width in clock cycles for a single
791 * PWM input.
796 * PWM capture is completed or a timeout occurs.
801 * @param[in] dev PWM device instance.
802 * @param channel PWM channel.
803 * @param flags PWM capture flags.
804 * @param[out] period Pointer to the memory to store the captured PWM period
806 * @param[out] pulse Pointer to the memory to store the captured PWM pulse width
811 * @retval -EBUSY PWM capture already in progress.
821 * @brief Capture a single PWM period/pulse width in microseconds for a single
822 * PWM input.
826 * function is blocking until either the PWM capture is completed or a timeout
832 * @param[in] dev PWM device instance.
833 * @param channel PWM channel.
834 * @param flags PWM capture flags.
835 * @param[out] period Pointer to the memory to store the captured PWM period
837 * @param[out] pulse Pointer to the memory to store the captured PWM pulse width
842 * @retval -EBUSY PWM capture already in progress.
876 * @brief Capture a single PWM period/pulse width in nanoseconds for a single
877 * PWM input.
881 * function is blocking until either the PWM capture is completed or a timeout
887 * @param[in] dev PWM device instance.
888 * @param channel PWM channel.
889 * @param flags PWM capture flags.
890 * @param[out] period Pointer to the memory to store the captured PWM period
892 * @param[out] pulse Pointer to the memory to store the captured PWM pulse width
897 * @retval -EBUSY PWM capture already in progress.
931 * @brief Validate that the PWM device is ready.
933 * @param spec PWM specification from devicetree
935 * @retval true If the PWM device is ready for use
936 * @retval false If the PWM device is not ready for use
951 #include <zephyr/syscalls/pwm.h>