Go to the documentation of this file.
28 #ifndef HBRIDGEDRIVER_H
29 #define HBRIDGEDRIVER_H
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
58 #define HBRIDGEDRIVER_PROP_DIS 0x00
59 #define HBRIDGEDRIVER_PROP_EN 0x01
77 #define HBRIDGEDRIVER_MAP_MIKROBUS( cfg, mikrobus ) \
78 cfg.il2 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
79 cfg.ih2 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
80 cfg.gen = MIKROBUS( mikrobus, MIKROBUS_CS ); \
81 cfg.il1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
82 cfg.ih1 = MIKROBUS( mikrobus, MIKROBUS_INT )
331 #endif // HBRIDGEDRIVER_H
void hbridgedriver_dc_bwd_1(hbridgedriver_t *ctx)
Motor Connected to HS/LS 1 Backward motion function.
digital_out_t ih2
Definition: hbridgedriver.h:94
void hbridgedriver_dc_coast_2(hbridgedriver_t *ctx)
Motor Connected to HS/LS 2 Coasting function.
void hbridgedriver_glo_enable(hbridgedriver_t *ctx, uint8_t state)
Global enable function.
pin_name_t ih2
Definition: hbridgedriver.h:108
void hbridgedriver_in_ls_1(hbridgedriver_t *ctx, uint8_t state)
Input Low Side 1 function.
void hbridgedriver_in_ls_2(hbridgedriver_t *ctx, uint8_t state)
Input Low Side 2 function.
void hbridgedriver_in_hs_1(hbridgedriver_t *ctx, uint8_t state)
Input High Side 1 function.
digital_out_t il2
Definition: hbridgedriver.h:93
void hbridgedriver_dc_brake_2(hbridgedriver_t *ctx)
Motor Connected to HS/LS 2 Braking function.
digital_out_t ih1
Definition: hbridgedriver.h:97
void hbridgedriver_forward(hbridgedriver_t *ctx)
H-Bridge mode forward function.
digital_out_t il1
Definition: hbridgedriver.h:96
void hbridgedriver_coasting(hbridgedriver_t *ctx)
H-Bridge mode coasting function.
void hbridgedriver_dc_coast_1(hbridgedriver_t *ctx)
Motor Connected to HS/LS 1 Coasting function.
pin_name_t il1
Definition: hbridgedriver.h:110
pin_name_t il2
Definition: hbridgedriver.h:107
hbridgedriver_return_value_t
H-Bridge Driver Click return value data.
Definition: hbridgedriver.h:120
pin_name_t ih1
Definition: hbridgedriver.h:111
void hbridgedriver_dc_brake_1(hbridgedriver_t *ctx)
Motor Connected to HS/LS 1 Braking function.
void hbridgedriver_dc_fwd_1(hbridgedriver_t *ctx)
Motor Connected to HS/LS 1 Foreward motion function.
pin_name_t gen
Definition: hbridgedriver.h:109
@ HBRIDGEDRIVER_ERROR
Definition: hbridgedriver.h:122
void hbridgedriver_in_hs_2(hbridgedriver_t *ctx, uint8_t state)
Input High Side 2 function.
H-Bridge Driver Click context object.
Definition: hbridgedriver.h:92
void hbridgedriver_reverse(hbridgedriver_t *ctx)
H-Bridge mode reverse function.
H-Bridge Driver Click configuration object.
Definition: hbridgedriver.h:106
void hbridgedriver_dc_bwd_2(hbridgedriver_t *ctx)
Motor Connected to HS/LS 2 Backward motion function.
void hbridgedriver_braking(hbridgedriver_t *ctx)
H-Bridge mode braking function.
digital_out_t gen
Definition: hbridgedriver.h:95
@ HBRIDGEDRIVER_OK
Definition: hbridgedriver.h:121
void hbridgedriver_dc_fwd_2(hbridgedriver_t *ctx)
Motor Connected to HS/LS 2 Foreward motion function.
void hbridgedriver_cfg_setup(hbridgedriver_cfg_t *cfg)
H-Bridge Driver configuration object setup function.
err_t hbridgedriver_init(hbridgedriver_t *ctx, hbridgedriver_cfg_t *cfg)
H-Bridge Driver initialization function.