42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
66#define VTOHZ_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
68 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
69 cfg.fo = MIKROBUS( mikrobus, MIKROBUS_INT )
76#define VTOHZ_RETVAL uint8_t
79#define VTOHZ_INIT_ERROR 0xFF
86#define VTOHZ_DEF_FREQ 50000
#define VTOHZ_RETVAL
Definition vtohz.h:76
VTOHZ_RETVAL vtohz_init(vtohz_t *ctx, vtohz_cfg_t *cfg)
Initialization function.
void vtohz_pwm_stop(vtohz_t *ctx)
Stop PWM module.
void vtohz_pwm_start(vtohz_t *ctx)
Start PWM module.
void vtohz_enable(vtohz_t *ctx)
Enable the click module.
void vtohz_set_duty_cycle(vtohz_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
void vtohz_cfg_setup(vtohz_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition vtohz.h:125
pin_name_t fo
Definition vtohz.h:133
uint32_t dev_pwm_freq
Definition vtohz.h:137
pin_name_t en
Definition vtohz.h:132
pin_name_t pwm
Definition vtohz.h:128
Click ctx object definition.
Definition vtohz.h:100
digital_in_t fo
Definition vtohz.h:109
uint32_t pwm_freq
Definition vtohz.h:117
digital_out_t en
Definition vtohz.h:104
pwm_t pwm
Definition vtohz.h:113