42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
65#define HBRIDGE7_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.en= MIKROBUS( mikrobus, MIKROBUS_RST ); \
67 cfg.nsl= MIKROBUS( mikrobus, MIKROBUS_CS ); \
68 cfg.ph= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
69 cfg.nft= MIKROBUS( mikrobus, MIKROBUS_INT )
76#define HBRIDGE7_RETVAL uint8_t
78#define HBRIDGE7_OK 0x00
79#define HBRIDGE7_INIT_ERROR 0xFF
86#define HBRIDGE7_MOTOR_SLEEP 0
87#define HBRIDGE7_MOTOR_BRAKE 1
88#define HBRIDGE7_MOTOR_REVERSE 2
89#define HBRIDGE7_MOTOR_FORWARD 3
#define HBRIDGE7_RETVAL
Definition hbridge7.h:76
void hbridge7_cfg_setup(hbridge7_cfg_t *cfg)
Config Object Initialization function.
uint8_t hbridge7_get_fault_state(hbridge7_t *ctx)
Get Fault pin state.
HBRIDGE7_RETVAL hbridge7_init(hbridge7_t *ctx, hbridge7_cfg_t *cfg)
Initialization function.
void hbridge7_motor_control(hbridge7_t *ctx, uint8_t ctrl)
Set motor control.
Click configuration structure definition.
Definition hbridge7.h:119
pin_name_t nft
Definition hbridge7.h:125
pin_name_t ph
Definition hbridge7.h:124
pin_name_t nsl
Definition hbridge7.h:123
pin_name_t en
Definition hbridge7.h:122
Click ctx object definition.
Definition hbridge7.h:102
digital_out_t nsl
Definition hbridge7.h:106
digital_out_t en
Definition hbridge7.h:105
digital_out_t ph
Definition hbridge7.h:107
digital_in_t nft
Definition hbridge7.h:111