Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
52 #define BRUSHLESS6_MAP_MIKROBUS( cfg, mikrobus ) \
53 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
63 #define BRUSHLESS6_RETVAL uint8_t
65 #define BRUSHLESS6_OK 0x00
66 #define BRUSHLESS6_INIT_ERROR 0xFF
73 #define BRUSHLESS6_DEF_FREQ 500
80 #define BRUSHLESS6_COEF 1.0 / ( ( 1000000.0 / BRUSHLESS6_DEF_FREQ ) / 0.3048 )
81 #define BRUSHLESS6_MIN_PWM_DC BRUSHLESS6_COEF * 2000.0
82 #define BRUSHLESS6_INIT_DC BRUSHLESS6_COEF * 4855.0
83 #define BRUSHLESS6_1MS_DC BRUSHLESS6_MIN_PWM_DC / 0.608
84 #define BRUSHLESS6_2MS_DC BRUSHLESS6_1MS_DC * 2.0
85 #define BRUSHLESS6_PERIOD BRUSHLESS6_1MS_DC / 10.0
203 #endif // _BRUSHLESS6_H_
#define BRUSHLESS6_RETVAL
Definition: brushless6.h:63
uint32_t dev_pwm_freq
Definition: brushless6.h:122
void brushless6_gpio_driver_init(brushless6_t *ctx)
GPIO Only Drivers - remove in other cases.
uint32_t pwm_freq
Definition: brushless6.h:107
BRUSHLESS6_RETVAL brushless6_init(brushless6_t *ctx, brushless6_cfg_t *cfg)
Initialization function.
pin_name_t pwm
Definition: brushless6.h:118
pwm_t pwm
Definition: brushless6.h:103
void brushless6_set_duty_cycle(brushless6_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
Click ctx object definition.
Definition: brushless6.h:98
void brushless6_pwm_stop(brushless6_t *ctx)
Stop PWM module.
Click configuration structure definition.
Definition: brushless6.h:114
void brushless6_pwm_start(brushless6_t *ctx)
Start PWM module.
void brushless6_cfg_setup(brushless6_cfg_t *cfg)
Config Object Initialization function.