multisteppertb67s109 2.0.0.0
multisteppertb67s109.h File Reference

This file contains API for Multi Stepper TB67S109 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  multisteppertb67s109_t
 Multi Stepper TB67S109 Click context object. More...
 
struct  multisteppertb67s109_cfg_t
 Multi Stepper TB67S109 Click configuration object. More...
 

Macros

#define MULTISTEPPERTB67S109_REG_INPUT   0x00
 Multi Stepper TB67S109 PCA9538A registers.
 
#define MULTISTEPPERTB67S109_REG_OUTPUT   0x01
 
#define MULTISTEPPERTB67S109_REG_POLARITY   0x02
 
#define MULTISTEPPERTB67S109_REG_CONFIG   0x03
 
#define MULTISTEPPERTB67S109_DMODE0_PIN   0x01
 Multi Stepper TB67S109 PCA9538A pin mask.
 
#define MULTISTEPPERTB67S109_DMODE1_PIN   0x02
 
#define MULTISTEPPERTB67S109_DMODE2_PIN   0x04
 
#define MULTISTEPPERTB67S109_MO_PIN   0x40
 
#define MULTISTEPPERTB67S109_LO_PIN   0x80
 
#define MULTISTEPPERTB67S109_DEFAULT_CONFIG   0xF8
 Multi Stepper TB67S109 PCA9538A pin direction config.
 
#define MULTISTEPPERTB67S109_DIR_CW   0
 Multi Stepper TB67S109 direction setting.
 
#define MULTISTEPPERTB67S109_DIR_CCW   1
 
#define MULTISTEPPERTB67S109_PIN_LOW_LEVEL   0
 Multi Stepper TB67S109 pin logic level setting.
 
#define MULTISTEPPERTB67S109_PIN_HIGH_LEVEL   1
 
#define MULTISTEPPERTB67S109_MODE_STANDBY   0x00
 Multi Stepper TB67S109 step resolution setting.
 
#define MULTISTEPPERTB67S109_MODE_HALF_STEP_TYPE_B   0x01
 
#define MULTISTEPPERTB67S109_MODE_HALF_STEP_TYPE_A   0x02
 
#define MULTISTEPPERTB67S109_MODE_1_OVER_16   0x03
 
#define MULTISTEPPERTB67S109_MODE_FULL_STEP   0x04
 
#define MULTISTEPPERTB67S109_MODE_1_OVER_8   0x05
 
#define MULTISTEPPERTB67S109_MODE_QUARTER_STEP   0x06
 
#define MULTISTEPPERTB67S109_MODE_1_OVER_32   0x07
 
#define MULTISTEPPERTB67S109_MODE_BITS_MASK   0x07
 
#define MULTISTEPPERTB67S109_SPEED_VERY_SLOW   0
 Multi Stepper TB67S109 device speed settings.
 
#define MULTISTEPPERTB67S109_SPEED_SLOW   1
 
#define MULTISTEPPERTB67S109_SPEED_MEDIUM   2
 
#define MULTISTEPPERTB67S109_SPEED_FAST   3
 
#define MULTISTEPPERTB67S109_SPEED_VERY_FAST   4
 
#define MULTISTEPPERTB67S109_DEVICE_ADDRESS_A1A0_00   0x70
 Multi Stepper TB67S109 device address setting.
 
#define MULTISTEPPERTB67S109_DEVICE_ADDRESS_A1A0_01   0x71
 
#define MULTISTEPPERTB67S109_DEVICE_ADDRESS_A1A0_10   0x72
 
#define MULTISTEPPERTB67S109_DEVICE_ADDRESS_A1A0_11   0x73
 
#define MULTISTEPPERTB67S109_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  multisteppertb67s109_return_value_t { MULTISTEPPERTB67S109_OK = 0 , MULTISTEPPERTB67S109_ERROR = -1 }
 Multi Stepper TB67S109 Click return value data. More...
 

Functions

void multisteppertb67s109_cfg_setup (multisteppertb67s109_cfg_t *cfg)
 Multi Stepper TB67S109 configuration object setup function.
 
err_t multisteppertb67s109_init (multisteppertb67s109_t *ctx, multisteppertb67s109_cfg_t *cfg)
 Multi Stepper TB67S109 initialization function.
 
err_t multisteppertb67s109_default_cfg (multisteppertb67s109_t *ctx)
 Multi Stepper TB67S109 default configuration function.
 
err_t multisteppertb67s109_write_register (multisteppertb67s109_t *ctx, uint8_t reg, uint8_t data_in)
 Multi Stepper TB67S109 write register function.
 
err_t multisteppertb67s109_read_register (multisteppertb67s109_t *ctx, uint8_t reg, uint8_t *data_out)
 Multi Stepper TB67S109 read register function.
 
err_t multisteppertb67s109_get_step_mode (multisteppertb67s109_t *ctx, uint8_t *mode)
 Multi Stepper TB67S109 get step mode function.
 
err_t multisteppertb67s109_set_step_mode (multisteppertb67s109_t *ctx, uint8_t mode)
 Multi Stepper TB67S109 set step mode function.
 
void multisteppertb67s109_drive_motor (multisteppertb67s109_t *ctx, uint32_t steps, uint8_t speed)
 Multi Stepper TB67S109 driver motor function.
 
void multisteppertb67s109_enable_device (multisteppertb67s109_t *ctx)
 Multi Stepper TB67S109 enable device function.
 
void multisteppertb67s109_disable_device (multisteppertb67s109_t *ctx)
 Multi Stepper TB67S109 disable device function.
 
void multisteppertb67s109_set_direction (multisteppertb67s109_t *ctx, uint8_t dir)
 Multi Stepper TB67S109 set direction function.
 
void multisteppertb67s109_switch_direction (multisteppertb67s109_t *ctx)
 Multi Stepper TB67S109 switch direction function.
 
void multisteppertb67s109_reset_device (multisteppertb67s109_t *ctx)
 Multi Stepper TB67S109 reset device function.
 
uint8_t multisteppertb67s109_get_int_pin (multisteppertb67s109_t *ctx)
 Multi Stepper TB67S109 get int pin function.
 
void multisteppertb67s109_set_clk_pin (multisteppertb67s109_t *ctx, uint8_t state)
 Multi Stepper TB67S109 set clk pin function.
 

Detailed Description

This file contains API for Multi Stepper TB67S109 Click Driver.

Enumeration Type Documentation

◆ multisteppertb67s109_return_value_t

Multi Stepper TB67S109 Click return value data.

Predefined enum values for driver return values.

Enumerator
MULTISTEPPERTB67S109_OK 
MULTISTEPPERTB67S109_ERROR