Functions for using Pulse-Width-Modulation (PWM) peripheral. More...

Functions

zos_result_t zn_pwm_update (zos_gpio_t gpio, uint32_t duty_cycle, int32_t frequency)
 Enable/update PWM on specified GPIO. More...
 
zos_result_t zn_pwm_stop (zos_gpio_t gpio)
 Disable PWM on specified GPIO. More...
 

Detailed Description

Functions for using Pulse-Width-Modulation (PWM) peripheral.

Function Documentation

zos_result_t zn_pwm_stop ( zos_gpio_t  gpio)

Disable PWM on specified GPIO.

See ZentriOS Command API documentation: pwm_update.

Parameters
[in]gpioGPIO of corresponding PWM to disable
Returns
result of API, see zos_result_t
zos_result_t zn_pwm_update ( zos_gpio_t  gpio,
uint32_t  duty_cycle,
int32_t  frequency 
)

Enable/update PWM on specified GPIO.

See ZentriOS Command API documentation: pwm_update.

Parameters
[in]gpioGPIO of corresponding PWM to enable/update
[in]duty_cycleDuty cycle of PWM, 0-100
[in]frequencyFrequency of PWM
Returns
result of API, see zos_result_t