multisteppertb62262 2.0.0.0
multisteppertb62262.h File Reference

This file contains API for Multi Stepper TB62262 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  multisteppertb62262_t
 Multi Stepper TB62262 Click context object. More...
 
struct  multisteppertb62262_cfg_t
 Multi Stepper TB62262 Click configuration object. More...
 

Macros

#define MULTISTEPPERTB62262_REG_INPUT   0x00
 Multi Stepper TB62262 PCA9538A registers.
 
#define MULTISTEPPERTB62262_REG_OUTPUT   0x01
 
#define MULTISTEPPERTB62262_REG_POLARITY   0x02
 
#define MULTISTEPPERTB62262_REG_CONFIG   0x03
 
#define MULTISTEPPERTB62262_DMODE1_PIN   0x02
 Multi Stepper TB62262 PCA9538A pin mask.
 
#define MULTISTEPPERTB62262_DMODE2_PIN   0x04
 
#define MULTISTEPPERTB62262_MO_PIN   0x40
 
#define MULTISTEPPERTB62262_DEFAULT_CONFIG   0xF9
 Multi Stepper TB62262 PCA9538A pin direction config.
 
#define MULTISTEPPERTB62262_DIR_CW   0
 Multi Stepper TB62262 direction setting.
 
#define MULTISTEPPERTB62262_DIR_CCW   1
 
#define MULTISTEPPERTB62262_PIN_LOW_LEVEL   0
 Multi Stepper TB62262 pin logic level setting.
 
#define MULTISTEPPERTB62262_PIN_HIGH_LEVEL   1
 
#define MULTISTEPPERTB62262_MODE_STANDBY   0x00
 Multi Stepper TB62262 step resolution setting.
 
#define MULTISTEPPERTB62262_MODE_HALF_STEP_TYPE_A   0x02
 
#define MULTISTEPPERTB62262_MODE_FULL_STEP   0x04
 
#define MULTISTEPPERTB62262_MODE_QUARTER_STEP   0x06
 
#define MULTISTEPPERTB62262_MODE_BITS_MASK   0x06
 
#define MULTISTEPPERTB62262_SPEED_VERY_SLOW   0
 Multi Stepper TB62262 device speed settings.
 
#define MULTISTEPPERTB62262_SPEED_SLOW   1
 
#define MULTISTEPPERTB62262_SPEED_MEDIUM   2
 
#define MULTISTEPPERTB62262_SPEED_FAST   3
 
#define MULTISTEPPERTB62262_SPEED_VERY_FAST   4
 
#define MULTISTEPPERTB62262_DEVICE_ADDRESS_A1A0_00   0x70
 Multi Stepper TB62262 device address setting.
 
#define MULTISTEPPERTB62262_DEVICE_ADDRESS_A1A0_01   0x71
 
#define MULTISTEPPERTB62262_DEVICE_ADDRESS_A1A0_10   0x72
 
#define MULTISTEPPERTB62262_DEVICE_ADDRESS_A1A0_11   0x73
 
#define MULTISTEPPERTB62262_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  multisteppertb62262_return_value_t { MULTISTEPPERTB62262_OK = 0 , MULTISTEPPERTB62262_ERROR = -1 }
 Multi Stepper TB62262 Click return value data. More...
 

Functions

void multisteppertb62262_cfg_setup (multisteppertb62262_cfg_t *cfg)
 Multi Stepper TB62262 configuration object setup function.
 
err_t multisteppertb62262_init (multisteppertb62262_t *ctx, multisteppertb62262_cfg_t *cfg)
 Multi Stepper TB62262 initialization function.
 
err_t multisteppertb62262_default_cfg (multisteppertb62262_t *ctx)
 Multi Stepper TB62262 default configuration function.
 
err_t multisteppertb62262_write_register (multisteppertb62262_t *ctx, uint8_t reg, uint8_t data_in)
 Multi Stepper TB62262 write register function.
 
err_t multisteppertb62262_read_register (multisteppertb62262_t *ctx, uint8_t reg, uint8_t *data_out)
 Multi Stepper TB62262 read register function.
 
err_t multisteppertb62262_get_step_mode (multisteppertb62262_t *ctx, uint8_t *mode)
 Multi Stepper TB62262 get step mode function.
 
err_t multisteppertb62262_set_step_mode (multisteppertb62262_t *ctx, uint8_t mode)
 Multi Stepper TB62262 set step mode function.
 
void multisteppertb62262_drive_motor (multisteppertb62262_t *ctx, uint32_t steps, uint8_t speed)
 Multi Stepper TB62262 driver motor function.
 
void multisteppertb62262_enable_device (multisteppertb62262_t *ctx)
 Multi Stepper TB62262 enable device function.
 
void multisteppertb62262_disable_device (multisteppertb62262_t *ctx)
 Multi Stepper TB62262 disable device function.
 
void multisteppertb62262_set_direction (multisteppertb62262_t *ctx, uint8_t dir)
 Multi Stepper TB62262 set direction function.
 
void multisteppertb62262_switch_direction (multisteppertb62262_t *ctx)
 Multi Stepper TB62262 switch direction function.
 
void multisteppertb62262_reset_device (multisteppertb62262_t *ctx)
 Multi Stepper TB62262 reset device function.
 
uint8_t multisteppertb62262_get_int_pin (multisteppertb62262_t *ctx)
 Multi Stepper TB62262 get int pin function.
 
void multisteppertb62262_set_clk_pin (multisteppertb62262_t *ctx, uint8_t state)
 Multi Stepper TB62262 set clk pin function.
 

Detailed Description

This file contains API for Multi Stepper TB62262 Click Driver.

Enumeration Type Documentation

◆ multisteppertb62262_return_value_t

Multi Stepper TB62262 Click return value data.

Predefined enum values for driver return values.

Enumerator
MULTISTEPPERTB62262_OK 
MULTISTEPPERTB62262_ERROR