39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define VIBROMOTOR_DEF_FREQ 5000
91#define VIBROMOTOR_MAP_MIKROBUS( cfg, mikrobus ) \
92 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
err_t vibromotor_pwm_stop(vibromotor_t *ctx)
Vibro Motor stop PWM module.
err_t vibromotor_pwm_start(vibromotor_t *ctx)
Vibro Motor start PWM module.
void vibromotor_cfg_setup(vibromotor_cfg_t *cfg)
Vibro Motor configuration object setup function.
err_t vibromotor_set_duty_cycle(vibromotor_t *ctx, float duty_cycle)
Vibro Motor sets PWM duty cycle.
err_t vibromotor_init(vibromotor_t *ctx, vibromotor_cfg_t *cfg)
Vibro Motor initialization function.
Vibro Motor Click configuration object.
Definition vibromotor.h:121
uint32_t dev_pwm_freq
Definition vibromotor.h:126
pin_name_t pwm
Definition vibromotor.h:123
Vibro Motor Click driver selector.
Definition vibromotor.h:107
uint32_t pwm_freq
Definition vibromotor.h:112
pwm_t pwm
Definition vibromotor.h:109
vibromotor_return_value_t
Vibro Motor Click return value data.
Definition vibromotor.h:135
@ VIBROMOTOR_ERROR
Definition vibromotor.h:137
@ VIBROMOTOR_OK
Definition vibromotor.h:136