stepper15
2.0.0.0
|
API for configuring and manipulating Stepper 15 Click driver. More...
Modules | |
Stepper 15 Registers List | |
List of registers of Stepper 15 Click driver. | |
Stepper 15 Registers Settings | |
Settings for registers of Stepper 15 Click driver. | |
Stepper 15 MikroBUS Map | |
MikroBUS pin mapping of Stepper 15 Click driver. | |
Direction | |
Work_mode | |
Output_mode | |
Fault_condition | |
Functions | |
void | stepper15_cfg_setup (stepper15_cfg_t *cfg) |
Stepper 15 configuration object setup function. More... | |
void | stepper15_drv_interface_selection (stepper15_cfg_t *cfg, stepper15_drv_t drv_sel) |
Stepper 15 driver interface setup function. More... | |
err_t | stepper15_init (stepper15_t *ctx, stepper15_cfg_t *cfg) |
Stepper 15 initialization function. More... | |
err_t | stepper15_default_cfg (stepper15_t *ctx) |
Stepper 15 default configuration function. More... | |
err_t | stepper15_generic_write (stepper15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Stepper 15 data writing function. More... | |
void | stepper15_reset (stepper15_t *ctx) |
Stepper 15 reset function. More... | |
void | stepper15_motor_stop (stepper15_t *ctx) |
Stepper 15 motor stop function. More... | |
uint8_t | stepper15_get_interrupt (stepper15_t *ctx) |
Stepper 15 get interrupt function. More... | |
err_t | stepper15_make_one_step (stepper15_t *ctx, uint8_t step_speed) |
Stepper 15 make one step function. More... | |
err_t | stepper15_set_direction (stepper15_t *ctx, uint8_t direction) |
Stepper 15 set direction function. More... | |
err_t | stepper15_set_work_mode (stepper15_t *ctx, uint8_t work_mode) |
Stepper 15 set work mode function. More... | |
err_t | stepper15_set_output_mode (stepper15_t *ctx, uint8_t output_mode) |
Stepper 15 set output mode function. More... | |
err_t | stepper15_set_torque_dac (stepper15_t *ctx, uint8_t trq_data) |
Stepper 15 set torque DAC function. More... | |
err_t | stepper15_set_counts (stepper15_t *ctx, uint8_t counts) |
Stepper 15 set counts function. More... | |
uint8_t | stepper15_get_fault_condition (stepper15_t *ctx) |
Stepper 15 get fault condition function. More... | |
err_t | stepper15_step_by_angle (stepper15_t *ctx, uint8_t step_speed, float angle, uint16_t step_360) |
Stepper 15 step by angle function. More... | |
API for configuring and manipulating Stepper 15 Click driver.
void stepper15_cfg_setup | ( | stepper15_cfg_t * | cfg | ) |
Stepper 15 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See stepper15_cfg_t object definition for detailed explanation. |
err_t stepper15_default_cfg | ( | stepper15_t * | ctx | ) |
Stepper 15 default configuration function.
This function executes a default configuration of Stepper 15 click board.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
0
- Success, -1
- Error.void stepper15_drv_interface_selection | ( | stepper15_cfg_t * | cfg, |
stepper15_drv_t | drv_sel | ||
) |
Stepper 15 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See stepper15_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See stepper15_drv_t object definition for detailed explanation. |
err_t stepper15_generic_write | ( | stepper15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Stepper 15 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.uint8_t stepper15_get_fault_condition | ( | stepper15_t * | ctx | ) |
Stepper 15 get fault condition function.
This function get fault condition of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
0
- Fault condition, 1
- Correct condition.uint8_t stepper15_get_interrupt | ( | stepper15_t * | ctx | ) |
Stepper 15 get interrupt function.
This function get interrupt flag state of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
0
- INT pin state low, 1
- INT pin state high.err_t stepper15_init | ( | stepper15_t * | ctx, |
stepper15_cfg_t * | cfg | ||
) |
Stepper 15 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See stepper15_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t stepper15_make_one_step | ( | stepper15_t * | ctx, |
uint8_t | step_speed | ||
) |
Stepper 15 make one step function.
This function performs make one step of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | step_speed | : Step speed ( percent from 1 to 100 ( max speed ) ). |
0
- Success, -1
- Error.void stepper15_motor_stop | ( | stepper15_t * | ctx | ) |
Stepper 15 motor stop function.
This function performs stop the stepper motor of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
void stepper15_reset | ( | stepper15_t * | ctx | ) |
Stepper 15 reset function.
This function performs hardware reset of the PCA9538A, Low-voltage 8-bit I2C-bus I/O port with interrupt and reset on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
err_t stepper15_set_counts | ( | stepper15_t * | ctx, |
uint8_t | counts | ||
) |
Stepper 15 set counts function.
This function set the counts of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | counts | : Counts 0 - 255. |
0
- Success, -1
- Error.err_t stepper15_set_direction | ( | stepper15_t * | ctx, |
uint8_t | direction | ||
) |
Stepper 15 set direction function.
This function selects the direction of movement of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | direction | :
|
0
- Success, -1
- Error.err_t stepper15_set_output_mode | ( | stepper15_t * | ctx, |
uint8_t | output_mode | ||
) |
Stepper 15 set output mode function.
This function set the output mode of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | output_mode | :
|
0
- Success, -1
- Error.err_t stepper15_set_torque_dac | ( | stepper15_t * | ctx, |
uint8_t | trq_data | ||
) |
Stepper 15 set torque DAC function.
This function set torque DAC to allows for the controller to scale the output current through SPI without needing to scale the Vref of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | trq_data | :
|
0
- Success, -1
- Error.err_t stepper15_set_work_mode | ( | stepper15_t * | ctx, |
uint8_t | work_mode | ||
) |
Stepper 15 set work mode function.
This function set the work mode of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | work_mode | :
|
0
- Success, -1
- Error.err_t stepper15_step_by_angle | ( | stepper15_t * | ctx, |
uint8_t | step_speed, | ||
float | angle, | ||
uint16_t | step_360 | ||
) |
Stepper 15 step by angle function.
This function turn the stepper motor to the desired angle of the DRV8889A-Q1 Automotive Stepper Driver with Integrated Current Sense, 1/256 Micro-Stepping, and Stall Detection on the Stepper 15 click board™.
[in] | ctx | : Click context object. See stepper15_t object definition for detailed explanation. |
[in] | step_speed | : Step speed ( percent from 1 to 100 ( max speed ) ). |
[in] | angle | : Angle of rotation. |
[in] | step_360 | : Number of steps per full circle. |
0
- Success, -1
- Error.