stepper16 2.0.0.0
|
This file contains API for Stepper16 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | stepper16_t |
Stepper16 Click context object. More... | |
struct | stepper16_cfg_t |
Stepper16 Click configuration object. More... | |
Macros | |
#define | STEPPER16_REG_CR1 0x01 |
Stepper16 control and status register. | |
#define | STEPPER16_REG_CR2 0x02 |
#define | STEPPER16_REG_CR3 0x03 |
#define | STEPPER16_REG_CR4 0x04 |
#define | STEPPER16_REG_CR5 0x0B |
#define | STEPPER16_REG_CR6 0x0C |
#define | STEPPER16_REG_SR1 0x05 |
#define | STEPPER16_REG_SR2 0x06 |
#define | STEPPER16_REG_SR3 0x07 |
#define | STEPPER16_REG_SR4 0x08 |
#define | STEPPER16_REG_SR5 0x09 |
#define | STEPPER16_REG_SR6 0x0A |
#define | STEPPER16_STEP_RES_FULL 0x7 |
Stepper16 step resolution. | |
#define | STEPPER16_STEP_RES_HALF 0x3 |
#define | STEPPER16_STEP_RES_QUARTER 0x2 |
#define | STEPPER16_STEP_RES_1div8 0x1 |
#define | STEPPER16_STEP_RES_1div16 0x0 |
#define | STEPPER16_SPEED_VERY_SLOW 1 |
Stepper 18 device speed settings. | |
#define | STEPPER16_SPEED_SLOW 2 |
#define | STEPPER16_SPEED_MEDIUM 3 |
#define | STEPPER16_SPEED_FAST 4 |
#define | STEPPER16_SPEED_VERY_FAST 5 |
#define | STEPPER16_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | stepper16_return_value_t { STEPPER16_OK = 0 , STEPPER16_ERROR = -1 } |
Stepper16 Click return value data. More... | |
Functions | |
void | stepper16_cfg_setup (stepper16_cfg_t *cfg) |
Stepper16 configuration object setup function. | |
err_t | stepper16_init (stepper16_t *ctx, stepper16_cfg_t *cfg) |
Stepper16 initialization function. | |
err_t | stepper16_default_cfg (stepper16_t *ctx) |
Stepper16 default configuration function. | |
err_t | stepper16_generic_write (stepper16_t *ctx, uint8_t reg, uint16_t data_in) |
Stepper16 data writing function. | |
err_t | stepper16_generic_read (stepper16_t *ctx, uint8_t reg, uint16_t *data_out) |
Stepper16 data reading function. | |
void | stepper16_set_next (stepper16_t *ctx, uint8_t value) |
Set next step state. | |
void | stepper16_set_dir (stepper16_t *ctx, uint8_t value) |
Set direction. | |
uint8_t | stepper16_get_error_flag (stepper16_t *ctx) |
Get error. | |
void | stepper16_hard_reset (stepper16_t *ctx) |
Resets device. | |
void | stepper16_wake_up (stepper16_t *ctx) |
Transimt wake up signal. | |
void | stepper16_set_step_resolution (stepper16_t *ctx, uint8_t step_res) |
Set step resolution. | |
void | stepper16_move_motor_angle (stepper16_t *ctx, float degree, uint8_t speed) |
Move motor in angle value. | |
void | stepper16_move_motor_step (stepper16_t *ctx, uint16_t steps, uint8_t speed) |
Move motor in step value. | |
void | stepper16_calculate_resolution (stepper16_t *ctx) |
Calculate step-degree resolution. | |
This file contains API for Stepper16 Click Driver.