stepper20 2.1.0.0
|
This file contains API for Stepper 20 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 | stepper20_t |
Stepper 20 Click context object. More... | |
struct | stepper20_cfg_t |
Stepper 20 Click configuration object. More... | |
Macros | |
#define | STEPPER20_REG_INPUT 0x00 |
Stepper 20 PCA9538A registers. | |
#define | STEPPER20_REG_OUTPUT 0x01 |
#define | STEPPER20_REG_POLARITY 0x02 |
#define | STEPPER20_REG_CONFIG 0x03 |
#define | STEPPER20_DMODE0_PIN 0x01 |
Stepper 20 PCA9538A pin mask. | |
#define | STEPPER20_DMODE1_PIN 0x02 |
#define | STEPPER20_DMODE2_PIN 0x04 |
#define | STEPPER20_SLEEP_X_PIN 0x08 |
#define | STEPPER20_LO_PIN 0x10 |
#define | STEPPER20_MO_PIN 0x20 |
#define | STEPPER20_DEFAULT_CONFIG 0xF0 |
Stepper 20 PCA9538A pin direction config. | |
#define | STEPPER20_DIR_CCW 0 |
Stepper 20 direction setting. | |
#define | STEPPER20_DIR_CW 1 |
#define | STEPPER20_PIN_LOW_LEVEL 0 |
Stepper 20 pin logic level setting. | |
#define | STEPPER20_PIN_HIGH_LEVEL 1 |
#define | STEPPER20_MODE_FULL_STEP 0x00 |
Stepper 20 step resolution setting. | |
#define | STEPPER20_MODE_HALF_STEP 0x01 |
#define | STEPPER20_MODE_QUARTER_STEP 0x02 |
#define | STEPPER20_MODE_1_OVER_8 0x03 |
#define | STEPPER20_MODE_1_OVER_16 0x04 |
#define | STEPPER20_MODE_1_OVER_32 0x05 |
#define | STEPPER20_MODE_MASK 0x07 |
#define | STEPPER20_SPEED_VERY_SLOW 0 |
Stepper 20 device speed settings. | |
#define | STEPPER20_SPEED_SLOW 1 |
#define | STEPPER20_SPEED_MEDIUM 2 |
#define | STEPPER20_SPEED_FAST 3 |
#define | STEPPER20_SPEED_VERY_FAST 4 |
#define | STEPPER20_DEVICE_ADDRESS_A1A0_00 0x70 |
Stepper 20 device address setting. | |
#define | STEPPER20_DEVICE_ADDRESS_A1A0_01 0x71 |
#define | STEPPER20_DEVICE_ADDRESS_A1A0_10 0x72 |
#define | STEPPER20_DEVICE_ADDRESS_A1A0_11 0x73 |
#define | STEPPER20_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | stepper20_return_value_t { STEPPER20_OK = 0 , STEPPER20_ERROR = -1 } |
Stepper 20 Click return value data. More... | |
Functions | |
void | stepper20_cfg_setup (stepper20_cfg_t *cfg) |
Stepper 20 configuration object setup function. | |
err_t | stepper20_init (stepper20_t *ctx, stepper20_cfg_t *cfg) |
Stepper 20 initialization function. | |
err_t | stepper20_default_cfg (stepper20_t *ctx) |
Stepper 20 default configuration function. | |
err_t | stepper20_write_register (stepper20_t *ctx, uint8_t reg, uint8_t data_in) |
Stepper 20 write register function. | |
err_t | stepper20_read_register (stepper20_t *ctx, uint8_t reg, uint8_t *data_out) |
Stepper 20 read register function. | |
err_t | stepper20_get_step_mode (stepper20_t *ctx, uint8_t *mode) |
Stepper 20 get step mode function. | |
err_t | stepper20_set_step_mode (stepper20_t *ctx, uint8_t mode) |
Stepper 20 set step mode function. | |
err_t | stepper20_get_sleep_x_pin (stepper20_t *ctx, uint8_t *state) |
Stepper 20 get sleep x pin function. | |
err_t | stepper20_set_sleep_x_pin (stepper20_t *ctx, uint8_t state) |
Stepper 20 set sleep x pin function. | |
err_t | stepper20_get_lo_pin (stepper20_t *ctx, uint8_t *state) |
Stepper 20 get lo pin function. | |
err_t | stepper20_get_mo_pin (stepper20_t *ctx, uint8_t *state) |
Stepper 20 get mo pin function. | |
void | stepper20_drive_motor (stepper20_t *ctx, uint32_t steps, uint8_t speed) |
Stepper 20 driver motor function. | |
void | stepper20_enable_device (stepper20_t *ctx) |
Stepper 20 enable device function. | |
void | stepper20_disable_device (stepper20_t *ctx) |
Stepper 20 disable device function. | |
void | stepper20_set_direction (stepper20_t *ctx, uint8_t dir) |
Stepper 20 set direction function. | |
void | stepper20_switch_direction (stepper20_t *ctx) |
Stepper 20 switch direction function. | |
void | stepper20_reset_device (stepper20_t *ctx) |
Stepper 20 reset device function. | |
uint8_t | stepper20_get_int_pin (stepper20_t *ctx) |
Stepper 20 get int pin function. | |
void | stepper20_set_clk_pin (stepper20_t *ctx, uint8_t state) |
Stepper 20 set clk pin function. | |
This file contains API for Stepper 20 Click Driver.