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 BRUSHLESS9_DEF_FREQ 5000
91#define BRUSHLESS9_MAP_MIKROBUS( cfg, mikrobus ) \
92 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
93 cfg.fg = MIKROBUS( mikrobus, MIKROBUS_AN ); \
94 cfg.dir = MIKROBUS( mikrobus, MIKROBUS_RST ); \
95 cfg.brk = MIKROBUS( mikrobus, MIKROBUS_CS ); \
96 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT );
err_t brushless9_init(brushless9_t *ctx, brushless9_cfg_t *cfg)
Brushless 9 initialization function.
uint8_t brushless9_get_fg(brushless9_t *ctx)
Brushless 9 fg state.
void brushless9_set_dir(brushless9_t *ctx, uint8_t state)
Brushless 9 dir pin setting.
err_t brushless9_pwm_stop(brushless9_t *ctx)
Brushless 9 stop PWM module.
err_t brushless9_pwm_start(brushless9_t *ctx)
Brushless 9 start PWM module.
void brushless9_set_brk(brushless9_t *ctx, uint8_t state)
Brushless 9 brk pin setting.
uint8_t brushless9_get_int_pin(brushless9_t *ctx)
Brushless 9 int_pin state.
err_t brushless9_set_duty_cycle(brushless9_t *ctx, float duty_cycle)
Brushless 9 sets PWM duty cycle.
void brushless9_cfg_setup(brushless9_cfg_t *cfg)
Brushless 9 configuration object setup function.
Brushless 9 Click configuration object.
Definition brushless9.h:133
pin_name_t fg
Definition brushless9.h:138
uint32_t dev_pwm_freq
Definition brushless9.h:144
pin_name_t dir
Definition brushless9.h:139
pin_name_t int_pin
Definition brushless9.h:141
pin_name_t pwm
Definition brushless9.h:135
pin_name_t brk
Definition brushless9.h:140
Brushless 9 Click driver selector.
Definition brushless9.h:111
digital_out_t brk
Definition brushless9.h:114
uint32_t pwm_freq
Definition brushless9.h:124
digital_in_t int_pin
Definition brushless9.h:118
digital_in_t fg
Definition brushless9.h:117
pwm_t pwm
Definition brushless9.h:121
digital_out_t dir
Definition brushless9.h:113