Functions | |
| wiced_result_t | wiced_pwm_init (wiced_pwm_t pwm, uint32_t frequency, float duty_cycle) |
| wiced_result_t | wiced_pwm_start (wiced_pwm_t pwm) |
| wiced_result_t | wiced_pwm_stop (wiced_pwm_t pwm) |
Pulse-Width Modulation (PWM) Functions
Example Usage // wiced_pwm_t is an enumeration of all available PWM interfaces // Defined in <WICED_SDK>/platforms/<platform_name>/platform.h // ranging from WICED_PWM_1 to WICED_PWM_MAX
wiced_pwm_init(WICED_PWM_1, frequency, duty_cycle);
wiced_pwm_start(WICED_PWM_1);
wiced_pwm_stop(WICED_PWM_1);
| wiced_result_t wiced_pwm_init | ( | wiced_pwm_t | pwm, |
| uint32_t | frequency, | ||
| float | duty_cycle ) |
Initializes a PWM pin
Prepares a Pulse-Width Modulation pin for use. Does not start the PWM output (use wiced_pwm_start).
| [in] | pwm | : The PWM interface which should be initialized |
| [in] | frequency | : Output signal frequency in Hertz |
| [in] | duty_cycle | : Duty cycle of signal as a floating-point percentage (0.0 to 100.0) |
| wiced_result_t wiced_pwm_start | ( | wiced_pwm_t | pwm | ) |
Starts PWM output on a PWM interface
Starts Pulse-Width Modulation signal output on a PWM pin
| [in] | pwm | : The PWM interface which should be started |
| wiced_result_t wiced_pwm_stop | ( | wiced_pwm_t | pwm | ) |
Stops output on a PWM pin
Stops Pulse-Width Modulation signal output on a PWM pin
| [in] | pwm | : The PWM interface which should be stopped |