hbridge4 2.0.0.0
hbridge4.h File Reference

This file contains API for H-Bridge 4 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"

Go to the source code of this file.

Data Structures

struct  hbridge4_t
 Click ctx object definition. More...
 
struct  hbridge4_cfg_t
 Click configuration structure definition. More...
 

Macros

#define HBRIDGE4_MAP_MIKROBUS(cfg, mikrobus)
 
#define HBRIDGE4_RETVAL   uint8_t
 
#define HBRIDGE4_OK   0x00
 
#define HBRIDGE4_INIT_ERROR   0xFF
 

Functions

void hbridge4_cfg_setup (hbridge4_cfg_t *cfg)
 Config Object Initialization function.
 
HBRIDGE4_RETVAL hbridge4_init (hbridge4_t *ctx, hbridge4_cfg_t *cfg)
 Initialization function.
 
void hbridge4_enable (hbridge4_t *ctx, uint8_t state)
 Enable the device function.
 
void hbridge4_set_in1 (hbridge4_t *ctx, uint8_t state)
 Set IN1 function.
 
void hbridge4_set_in2 (hbridge4_t *ctx, uint8_t state)
 Set IN2 function.
 
void hbridge4_set_in3 (hbridge4_t *ctx, uint8_t state)
 Set IN3 function.
 
void hbridge4_set_in4 (hbridge4_t *ctx, uint8_t state)
 Set IN4 function.
 
void hbridge4_motor_a_standby (hbridge4_t *ctx)
 Motor A standby function.
 
void hbridge4_motor_acw (hbridge4_t *ctx)
 Motor A clockwise motion function.
 
void hbridge4_motor_accw (hbridge4_t *ctx)
 Motor A counter-clockwise motion function.
 
void hbridge4_motor_a_brake (hbridge4_t *ctx)
 Motor A Brake function.
 
void hbridge4_motor_b_standby (hbridge4_t *ctx)
 Motor B standby function.
 
void hbridge4_motor_bcw (hbridge4_t *ctx)
 Motor B clockwise motion function.
 
void hbridge4_motor_bccw (hbridge4_t *ctx)
 Motor B counter-clockwise motion function.
 
void hbridge4_motor_b_brake (hbridge4_t *ctx)
 Motor B Brake function.
 

Detailed Description

This file contains API for H-Bridge 4 Click driver.