39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_analog_in.h"
63#define DCMOTOR15_RIPROP_OHM 1500
64#define DCMOTOR15_AIPROP_AMP 0.000455
80#define DCMOTOR15_MAP_MIKROBUS( cfg, mikrobus ) \
81 cfg.ipr = MIKROBUS( mikrobus, MIKROBUS_AN ); \
82 cfg.slp = MIKROBUS( mikrobus, MIKROBUS_RST ); \
83 cfg.in2 = MIKROBUS( mikrobus, MIKROBUS_CS ); \
84 cfg.in1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
85 cfg.flt = MIKROBUS( mikrobus, MIKROBUS_INT )
dcmotor15_pin_state_value_t
DC Motor 15 Click pin state value data.
Definition dcmotor15.h:139
@ DCMOTOR15_HIGH
Definition dcmotor15.h:141
@ DCMOTOR15_LOW
Definition dcmotor15.h:140
dcmotor15_return_value_t
DC Motor 15 Click return value data.
Definition dcmotor15.h:128
@ DCMOTOR15_ERROR
Definition dcmotor15.h:130
@ DCMOTOR15_OK
Definition dcmotor15.h:129
err_t dcmotor15_read_an_pin_value(dcmotor15_t *ctx, uint16_t *data_out)
DC Motor 15 read IPR pin value function.
void dcmotor15_cfg_setup(dcmotor15_cfg_t *cfg)
DC Motor 15 configuration object setup function.
void dcmotor15_brake(dcmotor15_t *ctx)
DC Motor 15 brake function.
void dcmotor15_forward(dcmotor15_t *ctx)
DC Motor 15 drive forward function.
void dcmotor15_default_cfg(dcmotor15_t *ctx)
DC Motor 15 default configuration function.
err_t dcmotor15_init(dcmotor15_t *ctx, dcmotor15_cfg_t *cfg)
DC Motor 15 initialization function.
void dcmotor15_stop(dcmotor15_t *ctx)
DC Motor 15 stop function.
void dcmotor15_reverse(dcmotor15_t *ctx)
DC Motor 15 drive reverse function.
void dcmotor15_set_in2_pin_state(dcmotor15_t *ctx, uint8_t state)
DC Motor 15 set IN2 pin state function.
float dcmotor15_get_current(dcmotor15_t *ctx, uint16_t num_of_conv)
DC Motor 15 get current function.
void dcmotor15_set_slp_pin_state(dcmotor15_t *ctx, uint8_t state)
DC Motor 15 set SLP pin state function.
uint8_t dcmotor15_fault_check(dcmotor15_t *ctx)
DC Motor 15 get FLT pin state function.
err_t dcmotor15_read_an_pin_voltage(dcmotor15_t *ctx, float *data_out)
DC Motor 15 read IPR pin voltage level function.
void dcmotor15_set_in1_pin_state(dcmotor15_t *ctx, uint8_t state)
DC Motor 15 set IN1 pin state function.
DC Motor 15 Click configuration object.
Definition dcmotor15.h:111
analog_in_resolution_t resolution
Definition dcmotor15.h:118
float vref
Definition dcmotor15.h:119
pin_name_t slp
Definition dcmotor15.h:113
pin_name_t in2
Definition dcmotor15.h:114
pin_name_t ipr
Definition dcmotor15.h:112
pin_name_t flt
Definition dcmotor15.h:116
pin_name_t in1
Definition dcmotor15.h:115
DC Motor 15 Click context object.
Definition dcmotor15.h:95
digital_out_t in2
Definition dcmotor15.h:97
digital_in_t flt
Definition dcmotor15.h:100
digital_out_t slp
Definition dcmotor15.h:96
digital_out_t in1
Definition dcmotor15.h:98
analog_in_t adc
Definition dcmotor15.h:102