Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
52 #define VIBROMOTOR_MAP_MIKROBUS( cfg, mikrobus ) \
53 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM );
60 #define VIBROMOTOR_RETVAL uint8_t
62 #define VIBROMOTOR_OK 0x00
63 #define VIBROMOTOR_INIT_ERROR 0xFF
70 #define VIBROMOTOR_DEF_FREQ 20000
186 #endif // _VIBROMOTOR_H_
uint32_t dev_pwm_freq
Definition: vibromotor.h:110
void vibromotor_cfg_setup(vibromotor_cfg_t *cfg)
Config Object Initialization function.
#define VIBROMOTOR_RETVAL
Definition: vibromotor.h:60
void vibromotor_pwm_start(vibromotor_t *ctx)
Start PWM module.
Click ctx object definition.
Definition: vibromotor.h:83
void vibromotor_set_duty_cycle(vibromotor_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
Click configuration structure definition.
Definition: vibromotor.h:100
pwm_t pwm
Definition: vibromotor.h:88
pin_name_t pwm
Definition: vibromotor.h:104
uint16_t pwm_period
Definition: vibromotor.h:92
void vibromotor_default_cfg(vibromotor_t *ctx)
Click Default Configuration function.
uint32_t pwm_freq
Definition: vibromotor.h:93
VIBROMOTOR_RETVAL vibromotor_init(vibromotor_t *ctx, vibromotor_cfg_t *cfg)
Initialization function.
void vibromotor_pwm_stop(vibromotor_t *ctx)
Stop PWM module.