PWM
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] gpio
GPIO 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] gpio
GPIO of corresponding PWM to enable/update [in] duty_cycle
Duty cycle of PWM, 0-100 [in] frequency
Frequency of PWM
- Returns
- result of API, see zos_result_t
- Examples:
- cloud/s2cdemo/zentri_platform_streams.c.