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 BRUSHLESS5_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
68 cfg.fg = MIKROBUS( mikrobus, MIKROBUS_INT )
75#define BRUSHLESS5_RETVAL uint8_t
77#define BRUSHLESS5_OK 0x00
78#define BRUSHLESS5_INIT_ERROR 0xFF
85#define BRUSHLESS5_DEF_FREQ 5000
#define BRUSHLESS5_RETVAL
Definition brushless5.h:75
uint8_t brushless5_get_fg(brushless5_t *ctx)
Get fg pin state.
void brushless5_set_duty_cycle(brushless5_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
BRUSHLESS5_RETVAL brushless5_init(brushless5_t *ctx, brushless5_cfg_t *cfg)
Initialization function.
void brushless5_pwm_stop(brushless5_t *ctx)
Stop PWM module.
void brushless5_cfg_setup(brushless5_cfg_t *cfg)
Config Object Initialization function.
void brushless5_pwm_start(brushless5_t *ctx)
Start PWM module.
Click configuration structure definition.
Definition brushless5.h:119
pin_name_t fg
Definition brushless5.h:126
uint32_t dev_pwm_freq
Definition brushless5.h:130
pin_name_t pwm
Definition brushless5.h:122
Click ctx object definition.
Definition brushless5.h:99
uint32_t pwm_freq
Definition brushless5.h:111
digital_in_t fg
Definition brushless5.h:103
pwm_t pwm
Definition brushless5.h:107