hbridgedriver  2.0.0.0
Data Structures | Macros | Enumerations | Functions
hbridgedriver.h File Reference

This file contains API for H-Bridge Driver Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  hbridgedriver_t
 H-Bridge Driver Click context object. More...
 
struct  hbridgedriver_cfg_t
 H-Bridge Driver Click configuration object. More...
 

Macros

#define HBRIDGEDRIVER_PROP_DIS   0x00
 H-Bridge Driver description setting. More...
 
#define HBRIDGEDRIVER_PROP_EN   0x01
 
#define HBRIDGEDRIVER_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  hbridgedriver_return_value_t { HBRIDGEDRIVER_OK = 0, HBRIDGEDRIVER_ERROR = -1 }
 H-Bridge Driver Click return value data. More...
 

Functions

void hbridgedriver_cfg_setup (hbridgedriver_cfg_t *cfg)
 H-Bridge Driver configuration object setup function. More...
 
err_t hbridgedriver_init (hbridgedriver_t *ctx, hbridgedriver_cfg_t *cfg)
 H-Bridge Driver initialization function. More...
 
void hbridgedriver_glo_enable (hbridgedriver_t *ctx, uint8_t state)
 Global enable function. More...
 
void hbridgedriver_in_ls_2 (hbridgedriver_t *ctx, uint8_t state)
 Input Low Side 2 function. More...
 
void hbridgedriver_in_hs_2 (hbridgedriver_t *ctx, uint8_t state)
 Input High Side 2 function. More...
 
void hbridgedriver_in_ls_1 (hbridgedriver_t *ctx, uint8_t state)
 Input Low Side 1 function. More...
 
void hbridgedriver_in_hs_1 (hbridgedriver_t *ctx, uint8_t state)
 Input High Side 1 function. More...
 
void hbridgedriver_dc_fwd_1 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 1 Foreward motion function. More...
 
void hbridgedriver_dc_bwd_1 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 1 Backward motion function. More...
 
void hbridgedriver_dc_coast_1 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 1 Coasting function. More...
 
void hbridgedriver_dc_brake_1 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 1 Braking function. More...
 
void hbridgedriver_dc_fwd_2 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 2 Foreward motion function. More...
 
void hbridgedriver_dc_bwd_2 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 2 Backward motion function. More...
 
void hbridgedriver_dc_coast_2 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 2 Coasting function. More...
 
void hbridgedriver_dc_brake_2 (hbridgedriver_t *ctx)
 Motor Connected to HS/LS 2 Braking function. More...
 
void hbridgedriver_reverse (hbridgedriver_t *ctx)
 H-Bridge mode reverse function. More...
 
void hbridgedriver_forward (hbridgedriver_t *ctx)
 H-Bridge mode forward function. More...
 
void hbridgedriver_braking (hbridgedriver_t *ctx)
 H-Bridge mode braking function. More...
 
void hbridgedriver_coasting (hbridgedriver_t *ctx)
 H-Bridge mode coasting function. More...
 

Detailed Description

This file contains API for H-Bridge Driver Click Driver.

Enumeration Type Documentation

◆ hbridgedriver_return_value_t

H-Bridge Driver Click return value data.

Predefined enum values for driver return values.

Enumerator
HBRIDGEDRIVER_OK 
HBRIDGEDRIVER_ERROR