Go to the documentation of this file.
38 #include "mikrosdk_version.h"
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
61 #define HBRIDGE2_MAP_MIKROBUS( cfg, mikrobus ) \
62 cfg.gin= MIKROBUS( mikrobus, MIKROBUS_AN ); \
63 cfg.dir= MIKROBUS( mikrobus, MIKROBUS_RST ); \
64 cfg.end= MIKROBUS( mikrobus, MIKROBUS_CS ); \
65 cfg.pwm= MIKROBUS( mikrobus, MIKROBUS_PWM )
72 #define HBRIDGE2_RETVAL uint8_t
74 #define HBRIDGE2_OK 0x00
75 #define HBRIDGE2_INIT_ERROR 0xFF
82 #define HBRIDGE2_OUT1_H_OUT2_H 0x00
83 #define HBRIDGE2_OUT1_H_OUT2_L 0x01
84 #define HBRIDGE2_OUT1_L_OUT2_H 0x02
85 #define HBRIDGE2_OUT1_Z_OUT2_Z 0x03
87 #define HBRIDGE2_DISABLE 0x00
88 #define HBRIDGE2_ENABLE 0x01
90 #define HBRIDGE2_GOUT_HIGH 0x00
91 #define HBRIDGE2_GOUT_LOW 0x01
201 #endif // _HBRIDGE2_H_
#define HBRIDGE2_RETVAL
Definition: hbridge2.h:72
pin_name_t gin
Definition: hbridge2.h:124
pin_name_t dir
Definition: hbridge2.h:125
digital_out_t gin
Definition: hbridge2.h:108
void hbridge2_enable(hbridge2_t *ctx, uint8_t state)
Enable function.
pin_name_t pwm
Definition: hbridge2.h:127
HBRIDGE2_RETVAL hbridge2_init(hbridge2_t *ctx, hbridge2_cfg_t *cfg)
Initialization function.
digital_out_t end
Definition: hbridge2.h:110
uint8_t hbridge2_set_output(hbridge2_t *ctx, uint8_t out_state)
Output Set function.
void hbridge2_cfg_setup(hbridge2_cfg_t *cfg)
Config Object Initialization function.
pin_name_t end
Definition: hbridge2.h:126
Click ctx object definition.
Definition: hbridge2.h:105
Click configuration structure definition.
Definition: hbridge2.h:121
void hbridge2_set_gout(hbridge2_t *ctx, uint8_t state)
GOUT Set function.
digital_out_t pwm
Definition: hbridge2.h:111
digital_out_t dir
Definition: hbridge2.h:109