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 LEDDRIVER5_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
68 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS );
76#define LEDDRIVER5_RETVAL uint8_t
78#define LEDDRIVER5_OK 0x00
79#define LEDDRIVER5_INIT_ERROR 0xFF
86#define LEDDRIVER5_DEF_FREQ 5000
#define LEDDRIVER5_RETVAL
Definition leddriver5.h:76
void leddriver5_pwm_start(leddriver5_t *ctx)
Start PWM module.
void leddriver5_pwm_stop(leddriver5_t *ctx)
Stop PWM module.
LEDDRIVER5_RETVAL leddriver5_init(leddriver5_t *ctx, leddriver5_cfg_t *cfg)
Initialization function.
void leddriver5_cfg_setup(leddriver5_cfg_t *cfg)
Config Object Initialization function.
void leddriver5_default_cfg(leddriver5_t *ctx)
Click Default Configuration function.
void leddriver5_set_duty_cycle(leddriver5_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
Click configuration structure definition.
Definition leddriver5.h:120
uint32_t dev_pwm_freq
Definition leddriver5.h:131
pin_name_t en
Definition leddriver5.h:127
pin_name_t pwm
Definition leddriver5.h:123
Click ctx object definition.
Definition leddriver5.h:100
uint32_t pwm_freq
Definition leddriver5.h:112
digital_out_t en
Definition leddriver5.h:104
pwm_t pwm
Definition leddriver5.h:108