Pin and port name type definitions.
hal_pin_name_t pin_name_t
Definition drv_name.h:74
pwm_err_t
Definition drv_pwm.h:58
@ PWM_ERROR
Definition drv_pwm.h:60
@ PWM_SUCCESS
Definition drv_pwm.h:59
err_t pwm_stop(pwm_t *obj)
Stop PWM module.
err_t pwm_open(pwm_t *obj, pwm_config_t *config)
Open the PWM driver object on selected pin.
err_t pwm_start(pwm_t *obj)
Enable counter and start PWM module.
err_t pwm_close(pwm_t *obj)
Close PWM driver context object.
err_t pwm_set_duty(pwm_t *obj, float duty_ratio)
Set PWM duty cycle in percentages.
err_t pwm_set_freq(pwm_t *obj, uint32_t freq_hz)
Set PWM frequency in Hertz.
void pwm_configure_default(pwm_config_t *config)
Configure PWM config structure.
This file contains all the functions prototypes for the PWM library.
int32_t err_t
Definition hal_target.h:64
PWM driver config structure, consisted of the following fields:
Definition drv_pwm.h:84
pin_name_t pin
Definition drv_pwm.h:85
uint32_t freq_hz
Definition drv_pwm.h:86
PWM driver context structure.
Definition drv_pwm.h:97
pwm_config_t config
Definition drv_pwm.h:99
handle_t handle
Definition drv_pwm.h:98