Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pwm_driver_api Struct Reference

Driver Operations PWM driver operations More...

#include <zephyr/drivers/pwm.h>

Data Fields

pwm_set_cycles_t set_cycles
  REQ Set the period and pulse width for a single PWM output.
pwm_get_cycles_per_sec_t get_cycles_per_sec
  REQ Get the clock rate (cycles per second) for a single PWM output.
pwm_configure_capture_t configure_capture
  OPT Configure PWM period/pulse width capture for a single PWM input.
pwm_enable_capture_t enable_capture
  OPT Enable PWM period/pulse width capture for a single PWM input.
pwm_disable_capture_t disable_capture
  OPT Disable PWM period/pulse width capture for a single PWM input.
pwm_manage_event_callback_t manage_event_callback
  OPT Add an application event callback.
pwm_enable_dma_t enable_dma
  OPT Enable DMA requests triggered by PWM cycles for a single PWM channel.
pwm_disable_dma_t disable_dma
  OPT Disable DMA requests triggered by PWM cycles for a single PWM channel.

Detailed Description

Driver Operations PWM driver operations

This is the driver API structure any PWM driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ configure_capture

pwm_configure_capture_t pwm_driver_api::configure_capture

OPT Configure PWM period/pulse width capture for a single PWM input.

Attention
Available only when the following Kconfig option is enabled: CONFIG_PWM_CAPTURE.

◆ disable_capture

pwm_disable_capture_t pwm_driver_api::disable_capture

OPT Disable PWM period/pulse width capture for a single PWM input.

Attention
Available only when the following Kconfig option is enabled: CONFIG_PWM_CAPTURE.

◆ disable_dma

pwm_disable_dma_t pwm_driver_api::disable_dma

OPT Disable DMA requests triggered by PWM cycles for a single PWM channel.

Attention
Available only when the following Kconfig option is enabled: CONFIG_PWM_WITH_DMA.

◆ enable_capture

pwm_enable_capture_t pwm_driver_api::enable_capture

OPT Enable PWM period/pulse width capture for a single PWM input.

Attention
Available only when the following Kconfig option is enabled: CONFIG_PWM_CAPTURE.

◆ enable_dma

pwm_enable_dma_t pwm_driver_api::enable_dma

OPT Enable DMA requests triggered by PWM cycles for a single PWM channel.

Attention
Available only when the following Kconfig option is enabled: CONFIG_PWM_WITH_DMA.

◆ get_cycles_per_sec

pwm_get_cycles_per_sec_t pwm_driver_api::get_cycles_per_sec

REQ Get the clock rate (cycles per second) for a single PWM output.

◆ manage_event_callback

pwm_manage_event_callback_t pwm_driver_api::manage_event_callback

OPT Add an application event callback.

Attention
Available only when the following Kconfig option is enabled: CONFIG_PWM_EVENT.

◆ set_cycles

pwm_set_cycles_t pwm_driver_api::set_cycles

REQ Set the period and pulse width for a single PWM output.


The documentation for this struct was generated from the following file: