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 BRUSHLESS17_DIR_CCW 0
74#define BRUSHLESS17_DIR_CW 1
80#define BRUSHLESS17_DEF_FREQ 5000
98#define BRUSHLESS17_MAP_MIKROBUS( cfg, mikrobus ) \
99 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
100 cfg.brk = MIKROBUS( mikrobus, MIKROBUS_AN ); \
101 cfg.dir = MIKROBUS( mikrobus, MIKROBUS_RST ); \
102 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
103 cfg.diag = MIKROBUS( mikrobus, MIKROBUS_INT );
brushless17_return_value_t
Brushless 17 Click return value data.
Definition brushless17.h:160
@ BRUSHLESS17_ERROR
Definition brushless17.h:162
@ BRUSHLESS17_OK
Definition brushless17.h:161
void brushless17_pull_brake(brushless17_t *ctx)
Brushless 17 pull brake function.
err_t brushless17_pwm_stop(brushless17_t *ctx)
Brushless 17 stop PWM module.
err_t brushless17_default_cfg(brushless17_t *ctx)
Brushless 17 default configuration function.
err_t brushless17_pwm_start(brushless17_t *ctx)
Brushless 17 start PWM module.
err_t brushless17_init(brushless17_t *ctx, brushless17_cfg_t *cfg)
Brushless 17 initialization function.
void brushless17_switch_direction(brushless17_t *ctx)
Brushless 17 switch direction function.
void brushless17_disable_chip(brushless17_t *ctx)
Brushless 17 disable chip function.
void brushless17_enable_chip(brushless17_t *ctx)
Brushless 17 enable chip function.
void brushless17_set_direction(brushless17_t *ctx, uint8_t dir)
Brushless 17 set direction function.
void brushless17_cfg_setup(brushless17_cfg_t *cfg)
Brushless 17 configuration object setup function.
void brushless17_release_brake(brushless17_t *ctx)
Brushless 17 release brake function.
uint8_t brushless17_get_diagnostic_pin(brushless17_t *ctx)
Brushless 17 get diagnostic pin function.
err_t brushless17_set_duty_cycle(brushless17_t *ctx, float duty_cycle)
Brushless 17 sets PWM duty cycle.
Brushless 17 Click configuration object.
Definition brushless17.h:140
pin_name_t diag
Definition brushless17.h:148
uint32_t dev_pwm_freq
Definition brushless17.h:151
pin_name_t dir
Definition brushless17.h:146
pin_name_t en
Definition brushless17.h:147
pin_name_t pwm
Definition brushless17.h:142
pin_name_t brk
Definition brushless17.h:145
Brushless 17 Click driver selector.
Definition brushless17.h:118
digital_out_t brk
Definition brushless17.h:120
uint32_t pwm_freq
Definition brushless17.h:131
digital_out_t en
Definition brushless17.h:122
digital_in_t diag
Definition brushless17.h:125
pwm_t pwm
Definition brushless17.h:128
digital_out_t dir
Definition brushless17.h:121