hbridge 2.1.0.0
|
This file contains API for H-Bridge Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
Go to the source code of this file.
Data Structures | |
struct | hbridge_t |
H-Bridge Click context object. More... | |
struct | hbridge_cfg_t |
H-Bridge Click configuration object. More... | |
Macros | |
#define | HBRIDGE_DIR_CW 0 |
H-Bridge direction setting. | |
#define | HBRIDGE_DIR_CCW 1 |
#define | HBRIDGE_PIN_LOW_LEVEL 0 |
H-Bridge pin logic level setting. | |
#define | HBRIDGE_PIN_HIGH_LEVEL 1 |
#define | HBRIDGE_MODE_FULL_STEP 0 |
H-Bridge step resolution setting. | |
#define | HBRIDGE_MODE_HALF_STEP 1 |
#define | HBRIDGE_SPEED_VERY_SLOW 0 |
H-Bridge device speed settings. | |
#define | HBRIDGE_SPEED_SLOW 1 |
#define | HBRIDGE_SPEED_MEDIUM 2 |
#define | HBRIDGE_SPEED_FAST 3 |
#define | HBRIDGE_SPEED_VERY_FAST 4 |
#define | HBRIDGE_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | hbridge_return_value_t { HBRIDGE_OK = 0 , HBRIDGE_ERROR = -1 } |
H-Bridge Click return value data. More... | |
Functions | |
void | hbridge_cfg_setup (hbridge_cfg_t *cfg) |
H-Bridge configuration object setup function. | |
err_t | hbridge_init (hbridge_t *ctx, hbridge_cfg_t *cfg) |
H-Bridge initialization function. | |
void | hbridge_set_in1a_pin (hbridge_t *ctx, uint8_t state) |
H-Bridge set in1a pin function. | |
void | hbridge_set_in2a_pin (hbridge_t *ctx, uint8_t state) |
H-Bridge set in2a pin function. | |
void | hbridge_set_in1b_pin (hbridge_t *ctx, uint8_t state) |
H-Bridge set in1b pin function. | |
void | hbridge_set_in2b_pin (hbridge_t *ctx, uint8_t state) |
H-Bridge set in2b pin function. | |
void | hbridge_set_step_mode (hbridge_t *ctx, uint8_t mode) |
H-Bridge set step mode function. | |
void | hbridge_set_direction (hbridge_t *ctx, uint8_t dir) |
H-Bridge set direction function. | |
void | hbridge_switch_direction (hbridge_t *ctx) |
H-Bridge switch direction function. | |
void | hbridge_enable_device (hbridge_t *ctx) |
H-Bridge enable device function. | |
void | hbridge_disable_device (hbridge_t *ctx) |
H-Bridge disable device function. | |
void | hbridge_drive_motor (hbridge_t *ctx, uint32_t steps, uint8_t speed) |
H-Bridge driver motor function. | |
This file contains API for H-Bridge Click Driver.