multisteppertb67s261 2.0.0.0
|
API for configuring and manipulating Multi Stepper TB67S261 Click driver. More...
Topics | |
Multi Stepper TB67S261 Registers List | |
List of registers of Multi Stepper TB67S261 Click driver. | |
Multi Stepper TB67S261 Registers Settings | |
Settings for registers of Multi Stepper TB67S261 Click driver. | |
Multi Stepper TB67S261 MikroBUS Map | |
MikroBUS pin mapping of Multi Stepper TB67S261 Click driver. | |
Functions | |
void | multisteppertb67s261_cfg_setup (multisteppertb67s261_cfg_t *cfg) |
Multi Stepper TB67S261 configuration object setup function. | |
err_t | multisteppertb67s261_init (multisteppertb67s261_t *ctx, multisteppertb67s261_cfg_t *cfg) |
Multi Stepper TB67S261 initialization function. | |
err_t | multisteppertb67s261_default_cfg (multisteppertb67s261_t *ctx) |
Multi Stepper TB67S261 default configuration function. | |
err_t | multisteppertb67s261_write_register (multisteppertb67s261_t *ctx, uint8_t reg, uint8_t data_in) |
Multi Stepper TB67S261 write register function. | |
err_t | multisteppertb67s261_read_register (multisteppertb67s261_t *ctx, uint8_t reg, uint8_t *data_out) |
Multi Stepper TB67S261 read register function. | |
err_t | multisteppertb67s261_drive_motor (multisteppertb67s261_t *ctx, uint32_t steps, uint8_t speed) |
Multi Stepper TB67S261 driver motor function. | |
void | multisteppertb67s261_enable_device (multisteppertb67s261_t *ctx) |
Multi Stepper TB67S261 enable device function. | |
void | multisteppertb67s261_disable_device (multisteppertb67s261_t *ctx) |
Multi Stepper TB67S261 disable device function. | |
void | multisteppertb67s261_set_ina1_pin (multisteppertb67s261_t *ctx, uint8_t state) |
Multi Stepper TB67S261 set ina1 pin function. | |
void | multisteppertb67s261_set_ina2_pin (multisteppertb67s261_t *ctx, uint8_t state) |
Multi Stepper TB67S261 set ina2 pin function. | |
void | multisteppertb67s261_set_inb1_pin (multisteppertb67s261_t *ctx, uint8_t state) |
Multi Stepper TB67S261 set inb1 pin function. | |
void | multisteppertb67s261_set_inb2_pin (multisteppertb67s261_t *ctx, uint8_t state) |
Multi Stepper TB67S261 set inb2 pin function. | |
void | multisteppertb67s261_set_step_mode (multisteppertb67s261_t *ctx, uint8_t mode) |
Multi Stepper TB67S261 set step mode function. | |
void | multisteppertb67s261_set_direction (multisteppertb67s261_t *ctx, uint8_t dir) |
Multi Stepper TB67S261 set direction function. | |
void | multisteppertb67s261_switch_direction (multisteppertb67s261_t *ctx) |
Multi Stepper TB67S261 switch direction function. | |
API for configuring and manipulating Multi Stepper TB67S261 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void multisteppertb67s261_cfg_setup | ( | multisteppertb67s261_cfg_t * | cfg | ) |
Multi Stepper TB67S261 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See multisteppertb67s261_cfg_t object definition for detailed explanation. |
err_t multisteppertb67s261_default_cfg | ( | multisteppertb67s261_t * | ctx | ) |
Multi Stepper TB67S261 default configuration function.
This function executes a default configuration of Multi Stepper TB67S261 click board.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
0
- Success, -1
- Error.void multisteppertb67s261_disable_device | ( | multisteppertb67s261_t * | ctx | ) |
Multi Stepper TB67S261 disable device function.
This function disables the device by setting the STANDBY pin to low logic state.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
err_t multisteppertb67s261_drive_motor | ( | multisteppertb67s261_t * | ctx, |
uint32_t | steps, | ||
uint8_t | speed ) |
Multi Stepper TB67S261 driver motor function.
This function drives the motor for the specific number of steps at the selected speed.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | steps | : Number of steps to rotate motor. |
[in] | speed | : Motor rotation speed:
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void multisteppertb67s261_enable_device | ( | multisteppertb67s261_t * | ctx | ) |
Multi Stepper TB67S261 enable device function.
This function enables the device by setting the STANDBY pin to high logic state.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
err_t multisteppertb67s261_init | ( | multisteppertb67s261_t * | ctx, |
multisteppertb67s261_cfg_t * | cfg ) |
Multi Stepper TB67S261 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See multisteppertb67s261_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t multisteppertb67s261_read_register | ( | multisteppertb67s261_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Multi Stepper TB67S261 read register function.
This function reads data from the selected PCA9538A register by using I2C serial interface.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void multisteppertb67s261_set_direction | ( | multisteppertb67s261_t * | ctx, |
uint8_t | dir ) |
Multi Stepper TB67S261 set direction function.
This function sets the motor direction to clockwise or counter-clockwise in ctx->direction.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | dir | :
|
void multisteppertb67s261_set_ina1_pin | ( | multisteppertb67s261_t * | ctx, |
uint8_t | state ) |
Multi Stepper TB67S261 set ina1 pin function.
This function sets the INA1 pin logic state.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | state | :
|
void multisteppertb67s261_set_ina2_pin | ( | multisteppertb67s261_t * | ctx, |
uint8_t | state ) |
Multi Stepper TB67S261 set ina2 pin function.
This function sets the INA2 pin logic state.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | state | :
|
void multisteppertb67s261_set_inb1_pin | ( | multisteppertb67s261_t * | ctx, |
uint8_t | state ) |
Multi Stepper TB67S261 set inb1 pin function.
This function sets the INB1 pin logic state.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | state | :
|
void multisteppertb67s261_set_inb2_pin | ( | multisteppertb67s261_t * | ctx, |
uint8_t | state ) |
Multi Stepper TB67S261 set inb2 pin function.
This function sets the INB2 pin logic state.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | state | :
|
void multisteppertb67s261_set_step_mode | ( | multisteppertb67s261_t * | ctx, |
uint8_t | mode ) |
Multi Stepper TB67S261 set step mode function.
This function sets the step mode resolution settings in ctx->step_mode.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | mode | : Step mode resolution.
|
void multisteppertb67s261_switch_direction | ( | multisteppertb67s261_t * | ctx | ) |
Multi Stepper TB67S261 switch direction function.
This function switches the motor direction in ctx->direction.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
err_t multisteppertb67s261_write_register | ( | multisteppertb67s261_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Multi Stepper TB67S261 write register function.
This function writes a desired data byte to the selected PCA9538A register by using I2C serial interface.
[in] | ctx | : Click context object. See multisteppertb67s261_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.