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 LEDDRIVER_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
74#define LEDDRIVER_RETVAL uint8_t
76#define LEDDRIVER_OK 0x00
77#define LEDDRIVER_INIT_ERROR 0xFF
78#define LEDDRIVER_FREQ_ERROR 0xFE
85#define LEDDRIVER_DEF_FREQ 10000
#define LEDDRIVER_RETVAL
Definition leddriver.h:74
err_t leddriver_set_duty_cycle(leddriver_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
void leddriver_cfg_setup(leddriver_cfg_t *cfg)
Config Object Initialization function.
uint16_t leddriver_get_pwm_max_duty(leddriver_t *ctx)
Get Max PWM Duty Cycle function.
LEDDRIVER_RETVAL leddriver_init(leddriver_t *ctx, leddriver_cfg_t *cfg)
Initialization function.
err_t leddriver_pwm_start(leddriver_t *ctx)
Start PWM module.
err_t leddriver_pwm_stop(leddriver_t *ctx)
Stop PWM module.
Click configuration structure definition.
Definition leddriver.h:110
uint32_t dev_pwm_freq
Definition leddriver.h:113
pin_name_t pwm
Definition leddriver.h:111
Click ctx object definition.
Definition leddriver.h:99
uint32_t pwm_freq
Definition leddriver.h:102
pwm_t pwm
Definition leddriver.h:100