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 DCMOTOR5_DEF_FREQ 20000
91#define DCMOTOR5_MAP_MIKROBUS( cfg, mikrobus ) \
92 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
93 cfg.snso = MIKROBUS( mikrobus, MIKROBUS_AN ); \
94 cfg.sleep = MIKROBUS( mikrobus, MIKROBUS_RST ); \
95 cfg.fault = MIKROBUS( mikrobus, MIKROBUS_CS ); \
96 cfg.in2 = MIKROBUS( mikrobus, MIKROBUS_INT );
dcmotor5_return_value_t
DC Motor 5 Click return value data.
Definition dcmotor5.h:148
@ DCMOTOR5_ERROR
Definition dcmotor5.h:150
@ DCMOTOR5_OK
Definition dcmotor5.h:149
void dcmotor5_short_brake(dcmotor5_t *ctx)
DC Motor 5 brake the engine function.
void dcmotor5_default_cfg(dcmotor5_t *ctx)
DC Motor 5 default configuration function.
void dcmotor5_pwm_stop(dcmotor5_t *ctx)
DC Motor 5 stop PWM module.
void dcmotor5_enable(dcmotor5_t *ctx)
DC Motor 5 start PWM module.
void dcmotor5_clockwise(dcmotor5_t *ctx)
DC Motor 5 Set the direction of rotation in the clockwise direction function.
void dcmotor5_stop(dcmotor5_t *ctx)
DC Motor 5 stop the engine function.
uint8_t dcmotor5_get_fault_conditions(dcmotor5_t *ctx)
DC Motor 5 get fault conditions state function.
uint8_t dcmotor5_get_sense_comparator(dcmotor5_t *ctx)
DC Motor 5 get sense comparator.
void dcmotor5_counter_clockwise(dcmotor5_t *ctx)
DC Motor 5 Set the direction of rotation in the counter clockwise direction function.
void dcmotor5_set_duty_cycle(dcmotor5_t *ctx, float duty_cycle)
DC Motor 5 sets PWM duty cycle.
void dcmotor5_pwm_start(dcmotor5_t *ctx)
DC Motor 5 start PWM module.
err_t dcmotor5_init(dcmotor5_t *ctx, dcmotor5_cfg_t *cfg)
DC Motor 5 initialization function.
void dcmotor5_cfg_setup(dcmotor5_cfg_t *cfg)
DC Motor 5 configuration object setup function.
void dcmotor5_standby(dcmotor5_t *ctx)
DC Motor 5 Disable the engine function.
DC Motor 5 Click configuration object.
Definition dcmotor5.h:128
pin_name_t sleep
Definition dcmotor5.h:134
pin_name_t in2
Definition dcmotor5.h:136
pin_name_t snso
Definition dcmotor5.h:133
uint32_t dev_pwm_freq
Definition dcmotor5.h:139
pin_name_t pwm
Definition dcmotor5.h:130
pin_name_t fault
Definition dcmotor5.h:135
DC Motor 5 Click context object.
Definition dcmotor5.h:106
digital_out_t sleep
Definition dcmotor5.h:108
digital_out_t in2
Definition dcmotor5.h:109
digital_in_t snso
Definition dcmotor5.h:112
uint32_t pwm_freq
Definition dcmotor5.h:119
digital_in_t fault
Definition dcmotor5.h:113
pwm_t pwm
Definition dcmotor5.h:116