stepper18 2.0.0.0
|
This file contains API for Stepper 18 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | stepper18_t |
Stepper 18 Click context object. More... | |
struct | stepper18_cfg_t |
Stepper 18 Click configuration object. More... | |
Macros | |
#define | STEPPER18_STEP_RES_FULL 1 |
Stepper 18 device step resolution. | |
#define | STEPPER18_STEP_RES_HALF 2 |
#define | STEPPER18_STEP_RES_QUARTER 4 |
#define | STEPPER18_STEP_RES_1div8 8 |
#define | STEPPER18_STEP_RES_1div16 16 |
#define | STEPPER18_STEP_RES_1div32 32 |
#define | STEPPER18_STEP_RES_1div64 64 |
#define | STEPPER18_STEP_RES_1div128 128 |
#define | STEPPER18_STEP_RES_1div256 256 |
#define | STEPPER18_SPEED_VERY_SLOW 1 |
Stepper 18 device speed settings. | |
#define | STEPPER18_SPEED_SLOW 2 |
#define | STEPPER18_SPEED_MEDIUM 3 |
#define | STEPPER18_SPEED_FAST 4 |
#define | STEPPER18_SPEED_VERY_FAST 5 |
#define | STEPPER18_SET_DEV_ADDR 0x60 |
Stepper 18 device address setting. | |
#define | STEPPER18_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | stepper18_return_value_t { STEPPER18_OK = 0 , STEPPER18_ERROR = -1 } |
Stepper 18 Click return value data. More... | |
Functions | |
void | stepper18_cfg_setup (stepper18_cfg_t *cfg) |
Stepper 18 configuration object setup function. | |
err_t | stepper18_init (stepper18_t *ctx, stepper18_cfg_t *cfg) |
Stepper 18 initialization function. | |
err_t | stepper18_default_cfg (stepper18_t *ctx) |
Stepper 18 default configuration function. | |
err_t | stepper18_generic_write (stepper18_t *ctx, uint8_t *tx_buf, uint8_t tx_len) |
Writing function. | |
err_t | stepper18_set_out_voltage (stepper18_t *ctx, uint16_t voltage) |
Set voltage reference. | |
void | stepper18_set_dir (stepper18_t *ctx, uint8_t value) |
Set direction. | |
void | stepper18_set_slp (stepper18_t *ctx, uint8_t value) |
Set sleep. | |
void | stepper18_set_en (stepper18_t *ctx, uint8_t value) |
Set enable. | |
void | stepper18_set_stp (stepper18_t *ctx, uint8_t value) |
Set step state. | |
uint8_t | stepper18_get_flt (stepper18_t *ctx) |
Get fault. | |
void | stepper18_move_motor_angle (stepper18_t *ctx, float degree, uint8_t step_res, uint8_t speed) |
Move motor in angle value. | |
void | stepper18_move_motor_step (stepper18_t *ctx, uint16_t steps, uint8_t step_res, uint8_t speed) |
Move motor in step value. | |
void | stepper18_calculate_resolution (stepper18_t *ctx) |
Calculate step-degree resolution. | |
This file contains API for Stepper 18 Click Driver.