39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define DRIVER2_PIN_ENABLE 0x01
74#define DRIVER2_PIN_DISABLE 0x00
80#define DRIVER2_DEF_FREQ 5000
98#define DRIVER2_MAP_MIKROBUS( cfg, mikrobus ) \
99 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
100 cfg.sd = MIKROBUS( mikrobus, MIKROBUS_CS ); \
101 cfg.fb = MIKROBUS( mikrobus, MIKROBUS_INT )
driver2_return_value_t
Driver 2 Click return value data.
Definition driver2.h:154
@ DRIVER2_ERROR
Definition driver2.h:156
@ DRIVER2_OK
Definition driver2.h:155
err_t driver2_init(driver2_t *ctx, driver2_cfg_t *cfg)
Driver 2 initialization function.
err_t driver2_default_cfg(driver2_t *ctx)
Driver 2 default configuration function.
void driver2_cfg_setup(driver2_cfg_t *cfg)
Driver 2 configuration object setup function.
void driver2_set_pwm_pin(driver2_t *ctx, uint8_t state)
Set PWM pin.
void driver2_set_sd_pin(driver2_t *ctx, uint8_t state)
Set SD pin.
err_t driver2_set_duty_cycle(driver2_t *ctx, float duty_cycle)
Driver 2 sets PWM duty cycle.
uint8_t driver2_get_fb_pin(driver2_t *ctx)
Get FB pin.
err_t driver2_pwm_stop(driver2_t *ctx)
Driver 2 stop PWM module.
err_t driver2_pwm_start(driver2_t *ctx)
Driver 2 start PWM module.
Driver 2 Click configuration object.
Definition driver2.h:136
pin_name_t sd
Definition driver2.h:141
pin_name_t fb
Definition driver2.h:142
uint32_t dev_pwm_freq
Definition driver2.h:145
pin_name_t pwm
Definition driver2.h:138
Driver 2 Click driver selector.
Definition driver2.h:116
digital_out_t sd
Definition driver2.h:118
digital_in_t fb
Definition driver2.h:121
uint32_t pwm_freq
Definition driver2.h:127
pwm_t pwm
Definition driver2.h:124