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 BRUSHLESS6_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
77#define BRUSHLESS6_RETVAL uint8_t
79#define BRUSHLESS6_OK 0x00
80#define BRUSHLESS6_INIT_ERROR 0xFF
87#define BRUSHLESS6_DEF_FREQ 500
94#define BRUSHLESS6_COEF 1.0 / ( ( 1000000.0 / BRUSHLESS6_DEF_FREQ ) / 0.3048 )
95#define BRUSHLESS6_MIN_PWM_DC BRUSHLESS6_COEF * 2000.0
96#define BRUSHLESS6_INIT_DC BRUSHLESS6_COEF * 4855.0
97#define BRUSHLESS6_1MS_DC BRUSHLESS6_MIN_PWM_DC / 0.608
98#define BRUSHLESS6_2MS_DC BRUSHLESS6_1MS_DC * 2.0
99#define BRUSHLESS6_PERIOD BRUSHLESS6_1MS_DC / 10.0
#define BRUSHLESS6_RETVAL
Definition brushless6.h:77
BRUSHLESS6_RETVAL brushless6_init(brushless6_t *ctx, brushless6_cfg_t *cfg)
Initialization function.
void brushless6_pwm_stop(brushless6_t *ctx)
Stop PWM module.
void brushless6_cfg_setup(brushless6_cfg_t *cfg)
Config Object Initialization function.
void brushless6_set_duty_cycle(brushless6_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
void brushless6_pwm_start(brushless6_t *ctx)
Start PWM module.
Click configuration structure definition.
Definition brushless6.h:129
uint32_t dev_pwm_freq
Definition brushless6.h:136
pin_name_t pwm
Definition brushless6.h:132
Click ctx object definition.
Definition brushless6.h:113
uint32_t pwm_freq
Definition brushless6.h:121
pwm_t pwm
Definition brushless6.h:117