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 PWMDRIVER_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
74#define PWMDRIVER_RETVAL uint8_t
76#define PWMDRIVER_OK 0x00
77#define PWMDRIVER_INIT_ERROR 0xFF
84#define PWMDRIVER_DEF_FREQ 20000
#define PWMDRIVER_RETVAL
Definition pwmdriver.h:74
void pwmdriver_set_duty_cycle(pwmdriver_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
PWMDRIVER_RETVAL pwmdriver_init(pwmdriver_t *ctx, pwmdriver_cfg_t *cfg)
Initialization function.
void pwmdriver_pwm_stop(pwmdriver_t *ctx)
Stop PWM module.
void pwmdriver_pwm_start(pwmdriver_t *ctx)
Start PWM module.
void pwmdriver_default_cfg(pwmdriver_t *ctx)
Click Default Configuration function.
void pwmdriver_cfg_setup(pwmdriver_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition pwmdriver.h:115
uint32_t dev_pwm_freq
Definition pwmdriver.h:123
pin_name_t pwm
Definition pwmdriver.h:118
Click ctx object definition.
Definition pwmdriver.h:98
uint32_t pwm_freq
Definition pwmdriver.h:107
pwm_t pwm
Definition pwmdriver.h:102
uint16_t pwm_period
Definition pwmdriver.h:106