38 #include "drv_digital_out.h" 39 #include "drv_digital_in.h" 51 #define HBRIDGE2_MAP_MIKROBUS( cfg, mikrobus ) \ 52 cfg.gin= MIKROBUS( mikrobus, MIKROBUS_AN ); \ 53 cfg.dir= MIKROBUS( mikrobus, MIKROBUS_RST ); \ 54 cfg.end= MIKROBUS( mikrobus, MIKROBUS_CS ); \ 55 cfg.pwm= MIKROBUS( mikrobus, MIKROBUS_PWM ) 62 #define HBRIDGE2_RETVAL uint8_t 64 #define HBRIDGE2_OK 0x00 65 #define HBRIDGE2_INIT_ERROR 0xFF 72 #define HBRIDGE2_OUT1_H_OUT2_H 0x00 73 #define HBRIDGE2_OUT1_H_OUT2_L 0x01 74 #define HBRIDGE2_OUT1_L_OUT2_H 0x02 75 #define HBRIDGE2_OUT1_Z_OUT2_Z 0x03 77 #define HBRIDGE2_DISABLE 0x00 78 #define HBRIDGE2_ENABLE 0x01 80 #define HBRIDGE2_GOUT_HIGH 0x00 81 #define HBRIDGE2_GOUT_LOW 0x01 191 #endif // _HBRIDGE2_H_ void hbridge2_enable(hbridge2_t *ctx, uint8_t state)
Enable function.
Click configuration structure definition.
Definition: hbridge2.h:110
digital_out_t gin
Definition: hbridge2.h:98
Click ctx object definition.
Definition: hbridge2.h:94
pin_name_t dir
Definition: hbridge2.h:115
digital_out_t pwm
Definition: hbridge2.h:101
#define HBRIDGE2_RETVAL
Definition: hbridge2.h:62
pin_name_t gin
Definition: hbridge2.h:114
pin_name_t pwm
Definition: hbridge2.h:117
digital_out_t end
Definition: hbridge2.h:100
pin_name_t end
Definition: hbridge2.h:116
void hbridge2_cfg_setup(hbridge2_cfg_t *cfg)
Config Object Initialization function.
digital_out_t dir
Definition: hbridge2.h:99
void hbridge2_set_gout(hbridge2_t *ctx, uint8_t state)
GOUT Set function.
HBRIDGE2_RETVAL hbridge2_init(hbridge2_t *ctx, hbridge2_cfg_t *cfg)
Initialization function.
uint8_t hbridge2_set_output(hbridge2_t *ctx, uint8_t out_state)
Output Set function.