stepper9 2.1.0.0
|
This file contains API for Stepper 9 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 | stepper9_t |
Stepper 9 Click context object. More... | |
struct | stepper9_cfg_t |
Stepper 9 Click configuration object. More... | |
Macros | |
#define | STEPPER9_REG_INPUT 0x00 |
Stepper 9 PCA9538A registers. | |
#define | STEPPER9_REG_OUTPUT 0x01 |
#define | STEPPER9_REG_POLARITY 0x02 |
#define | STEPPER9_REG_CONFIG 0x03 |
#define | STEPPER9_DMODE0_PIN 0x01 |
Stepper 9 PCA9538A pin mask. | |
#define | STEPPER9_DMODE1_PIN 0x02 |
#define | STEPPER9_DMODE2_PIN 0x04 |
#define | STEPPER9_SLEEP_X_PIN 0x08 |
#define | STEPPER9_LO_PIN 0x10 |
#define | STEPPER9_MO_PIN 0x20 |
#define | STEPPER9_DEFAULT_CONFIG 0xF0 |
Stepper 9 PCA9538A pin direction config. | |
#define | STEPPER9_DIR_CCW 0 |
Stepper 9 direction setting. | |
#define | STEPPER9_DIR_CW 1 |
#define | STEPPER9_PIN_LOW_LEVEL 0 |
Stepper 9 pin logic level setting. | |
#define | STEPPER9_PIN_HIGH_LEVEL 1 |
#define | STEPPER9_MODE_FULL_STEP 0x00 |
Stepper 9 step resolution setting. | |
#define | STEPPER9_MODE_HALF_STEP 0x01 |
#define | STEPPER9_MODE_QUARTER_STEP 0x02 |
#define | STEPPER9_MODE_1_OVER_8 0x03 |
#define | STEPPER9_MODE_1_OVER_16 0x04 |
#define | STEPPER9_MODE_1_OVER_32 0x05 |
#define | STEPPER9_MODE_MASK 0x07 |
#define | STEPPER9_SPEED_VERY_SLOW 0 |
Stepper 9 device speed settings. | |
#define | STEPPER9_SPEED_SLOW 1 |
#define | STEPPER9_SPEED_MEDIUM 2 |
#define | STEPPER9_SPEED_FAST 3 |
#define | STEPPER9_SPEED_VERY_FAST 4 |
#define | STEPPER9_DEVICE_ADDRESS_A1A0_00 0x70 |
Stepper 9 device address setting. | |
#define | STEPPER9_DEVICE_ADDRESS_A1A0_01 0x71 |
#define | STEPPER9_DEVICE_ADDRESS_A1A0_10 0x72 |
#define | STEPPER9_DEVICE_ADDRESS_A1A0_11 0x73 |
#define | STEPPER9_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | stepper9_return_value_t { STEPPER9_OK = 0 , STEPPER9_ERROR = -1 } |
Stepper 9 Click return value data. More... | |
Functions | |
void | stepper9_cfg_setup (stepper9_cfg_t *cfg) |
Stepper 9 configuration object setup function. | |
err_t | stepper9_init (stepper9_t *ctx, stepper9_cfg_t *cfg) |
Stepper 9 initialization function. | |
err_t | stepper9_default_cfg (stepper9_t *ctx) |
Stepper 9 default configuration function. | |
err_t | stepper9_write_register (stepper9_t *ctx, uint8_t reg, uint8_t data_in) |
Stepper 9 write register function. | |
err_t | stepper9_read_register (stepper9_t *ctx, uint8_t reg, uint8_t *data_out) |
Stepper 9 read register function. | |
err_t | stepper9_get_step_mode (stepper9_t *ctx, uint8_t *mode) |
Stepper 9 get step mode function. | |
err_t | stepper9_set_step_mode (stepper9_t *ctx, uint8_t mode) |
Stepper 9 set step mode function. | |
err_t | stepper9_get_sleep_x_pin (stepper9_t *ctx, uint8_t *state) |
Stepper 9 get sleep x pin function. | |
err_t | stepper9_set_sleep_x_pin (stepper9_t *ctx, uint8_t state) |
Stepper 9 set sleep x pin function. | |
err_t | stepper9_get_lo_pin (stepper9_t *ctx, uint8_t *state) |
Stepper 9 get lo pin function. | |
err_t | stepper9_get_mo_pin (stepper9_t *ctx, uint8_t *state) |
Stepper 9 get mo pin function. | |
void | stepper9_drive_motor (stepper9_t *ctx, uint32_t steps, uint8_t speed) |
Stepper 9 driver motor function. | |
void | stepper9_enable_device (stepper9_t *ctx) |
Stepper 9 enable device function. | |
void | stepper9_disable_device (stepper9_t *ctx) |
Stepper 9 disable device function. | |
void | stepper9_set_direction (stepper9_t *ctx, uint8_t dir) |
Stepper 9 set direction function. | |
void | stepper9_switch_direction (stepper9_t *ctx) |
Stepper 9 switch direction function. | |
void | stepper9_reset_device (stepper9_t *ctx) |
Stepper 9 reset device function. | |
uint8_t | stepper9_get_int_pin (stepper9_t *ctx) |
Stepper 9 get int pin function. | |
void | stepper9_set_clk_pin (stepper9_t *ctx, uint8_t state) |
Stepper 9 set clk pin function. | |
This file contains API for Stepper 9 Click Driver.