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 VTOHZ2_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 VTOHZ2_RETVAL uint8_t
79#define VTOHZ2_INIT_ERROR 0xFF
86#define VTOHZ2_ENABLE 1
87#define VTOHZ2_DISABLE 0
94#define VTOHZ2_DEF_FREQ 20000
#define VTOHZ2_RETVAL
Definition vtohz2.h:76
void vtohz2_enable(vtohz2_t *ctx, uint8_t state)
Enable function.
void vtohz2_set_duty_cycle(vtohz2_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
void vtohz2_pwm_start(vtohz2_t *ctx)
Start PWM module.
void vtohz2_cfg_setup(vtohz2_cfg_t *cfg)
Config Object Initialization function.
void vtohz2_default_cfg(vtohz2_t *ctx)
Click Default Configuration function.
uint8_t vtohz2_get_freq_out(vtohz2_t *ctx)
Frequency Out Get function.
void vtohz2_pwm_stop(vtohz2_t *ctx)
Stop PWM module.
VTOHZ2_RETVAL vtohz2_init(vtohz2_t *ctx, vtohz2_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition vtohz2.h:132
pin_name_t fo
Definition vtohz2.h:140
uint32_t dev_pwm_freq
Definition vtohz2.h:144
pin_name_t en
Definition vtohz2.h:139
pin_name_t pwm
Definition vtohz2.h:135
Click ctx object definition.
Definition vtohz2.h:108
digital_in_t fo
Definition vtohz2.h:116
uint32_t pwm_freq
Definition vtohz2.h:124
digital_out_t en
Definition vtohz2.h:112
pwm_t pwm
Definition vtohz2.h:120