multisteppertb62269 2.0.0.0
|
API for configuring and manipulating Multi Stepper TB62269 Click driver. More...
Topics | |
Multi Stepper TB62269 Registers List | |
List of registers of Multi Stepper TB62269 Click driver. | |
Multi Stepper TB62269 Registers Settings | |
Settings for registers of Multi Stepper TB62269 Click driver. | |
Multi Stepper TB62269 MikroBUS Map | |
MikroBUS pin mapping of Multi Stepper TB62269 Click driver. | |
Functions | |
void | multisteppertb62269_cfg_setup (multisteppertb62269_cfg_t *cfg) |
Multi Stepper TB62269 configuration object setup function. | |
err_t | multisteppertb62269_init (multisteppertb62269_t *ctx, multisteppertb62269_cfg_t *cfg) |
Multi Stepper TB62269 initialization function. | |
err_t | multisteppertb62269_default_cfg (multisteppertb62269_t *ctx) |
Multi Stepper TB62269 default configuration function. | |
err_t | multisteppertb62269_write_register (multisteppertb62269_t *ctx, uint8_t reg, uint8_t data_in) |
Multi Stepper TB62269 write register function. | |
err_t | multisteppertb62269_read_register (multisteppertb62269_t *ctx, uint8_t reg, uint8_t *data_out) |
Multi Stepper TB62269 read register function. | |
err_t | multisteppertb62269_get_step_mode (multisteppertb62269_t *ctx, uint8_t *mode) |
Multi Stepper TB62269 get step mode function. | |
err_t | multisteppertb62269_set_step_mode (multisteppertb62269_t *ctx, uint8_t mode) |
Multi Stepper TB62269 set step mode function. | |
void | multisteppertb62269_drive_motor (multisteppertb62269_t *ctx, uint32_t steps, uint8_t speed) |
Multi Stepper TB62269 driver motor function. | |
void | multisteppertb62269_enable_device (multisteppertb62269_t *ctx) |
Multi Stepper TB62269 enable device function. | |
void | multisteppertb62269_disable_device (multisteppertb62269_t *ctx) |
Multi Stepper TB62269 disable device function. | |
void | multisteppertb62269_set_direction (multisteppertb62269_t *ctx, uint8_t dir) |
Multi Stepper TB62269 set direction function. | |
void | multisteppertb62269_switch_direction (multisteppertb62269_t *ctx) |
Multi Stepper TB62269 switch direction function. | |
void | multisteppertb62269_reset_device (multisteppertb62269_t *ctx) |
Multi Stepper TB62269 reset device function. | |
uint8_t | multisteppertb62269_get_int_pin (multisteppertb62269_t *ctx) |
Multi Stepper TB62269 get int pin function. | |
void | multisteppertb62269_set_clk_pin (multisteppertb62269_t *ctx, uint8_t state) |
Multi Stepper TB62269 set clk pin function. | |
API for configuring and manipulating Multi Stepper TB62269 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void multisteppertb62269_cfg_setup | ( | multisteppertb62269_cfg_t * | cfg | ) |
Multi Stepper TB62269 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See multisteppertb62269_cfg_t object definition for detailed explanation. |
err_t multisteppertb62269_default_cfg | ( | multisteppertb62269_t * | ctx | ) |
Multi Stepper TB62269 default configuration function.
This function executes a default configuration of Multi Stepper TB62269 click board.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
0
- Success, -1
- Error.void multisteppertb62269_disable_device | ( | multisteppertb62269_t * | ctx | ) |
Multi Stepper TB62269 disable device function.
This function disables the device by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
void multisteppertb62269_drive_motor | ( | multisteppertb62269_t * | ctx, |
uint32_t | steps, | ||
uint8_t | speed ) |
Multi Stepper TB62269 driver motor function.
This function drives the motor for the specific number of steps at the selected speed.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
[in] | steps | : Number of steps to rotate motor. |
[in] | speed | : Motor rotation speed:
|
void multisteppertb62269_enable_device | ( | multisteppertb62269_t * | ctx | ) |
Multi Stepper TB62269 enable device function.
This function enables the device by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
uint8_t multisteppertb62269_get_int_pin | ( | multisteppertb62269_t * | ctx | ) |
Multi Stepper TB62269 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
err_t multisteppertb62269_get_step_mode | ( | multisteppertb62269_t * | ctx, |
uint8_t * | mode ) |
Multi Stepper TB62269 get step mode function.
This function reads the step mode resolution settings.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
[out] | mode | : Step mode resolution. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t multisteppertb62269_init | ( | multisteppertb62269_t * | ctx, |
multisteppertb62269_cfg_t * | cfg ) |
Multi Stepper TB62269 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See multisteppertb62269_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t multisteppertb62269_read_register | ( | multisteppertb62269_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Multi Stepper TB62269 read register function.
This function reads data from the selected PCA9538A register by using I2C serial interface.
[in] | ctx | : Click context object. See multisteppertb62269_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 multisteppertb62269_reset_device | ( | multisteppertb62269_t * | ctx | ) |
Multi Stepper TB62269 reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
void multisteppertb62269_set_clk_pin | ( | multisteppertb62269_t * | ctx, |
uint8_t | state ) |
Multi Stepper TB62269 set clk pin function.
This function sets the CLK pin logic state.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
[in] | state | :
|
void multisteppertb62269_set_direction | ( | multisteppertb62269_t * | ctx, |
uint8_t | dir ) |
Multi Stepper TB62269 set direction function.
This function sets the motor direction by setting the AN pin logic state.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
[in] | dir | :
|
err_t multisteppertb62269_set_step_mode | ( | multisteppertb62269_t * | ctx, |
uint8_t | mode ) |
Multi Stepper TB62269 set step mode function.
This function sets the step mode resolution settings.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
[in] | mode | : Step mode resolution. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void multisteppertb62269_switch_direction | ( | multisteppertb62269_t * | ctx | ) |
Multi Stepper TB62269 switch direction function.
This function switches the motor direction by toggling the AN pin.
[in] | ctx | : Click context object. See multisteppertb62269_t object definition for detailed explanation. |
err_t multisteppertb62269_write_register | ( | multisteppertb62269_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Multi Stepper TB62269 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 multisteppertb62269_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.