mikroSDK Reference Manual
pwm_config_t Struct Reference

PWM driver config structure, consisted of the following fields: More...

Data Fields

pin_name_t pin
 
uint32_t freq_hz
 

Detailed Description

The context structure for storing driver configuration. User shall define the values stored within.

Warning
The following example describes how to fill a pwm_config_t structure. Take into consideration that different hardware might not have the same pin. Make sure to accommodate pin name based on your hardware specifics.

Example

// PWM driver configuration structure.
pwm_config_t pwm_cfg;
// Set PWM pin.
pwm_cfg.pin = MIKROBUS_1_PWM;
// Set PWM frequency.
pwm_cfg.freq_hz = 5000;

Field Documentation

◆ pin

pin_name_t pwm_config_t::pin

PWM pin.

◆ freq_hz

uint32_t pwm_config_t::freq_hz

PWM Frequency in Hz.

pwm_config_t
PWM driver config structure, consisted of the following fields:
Definition: drv_pwm.h:82
pwm_config_t::freq_hz
uint32_t freq_hz
Definition: drv_pwm.h:85
pwm_config_t::pin
pin_name_t pin
Definition: drv_pwm.h:84