stspin220 2.1.0.0
|
This file contains API for STSPIN220 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
Go to the source code of this file.
Data Structures | |
struct | stspin220_t |
STSPIN220 Click context object. More... | |
struct | stspin220_cfg_t |
STSPIN220 Click configuration object. More... | |
Macros | |
#define | STSPIN220_DIR_CW 0 |
STSPIN220 direction setting. | |
#define | STSPIN220_DIR_CCW 1 |
#define | STSPIN220_PIN_LOW_LEVEL 0 |
STSPIN220 pin logic level setting. | |
#define | STSPIN220_PIN_HIGH_LEVEL 1 |
#define | STSPIN220_SPEED_VERY_SLOW 0 |
STSPIN220 device speed settings. | |
#define | STSPIN220_SPEED_SLOW 1 |
#define | STSPIN220_SPEED_MEDIUM 2 |
#define | STSPIN220_SPEED_FAST 3 |
#define | STSPIN220_SPEED_VERY_FAST 4 |
#define | STSPIN220_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | stspin220_return_value_t { STSPIN220_OK = 0 , STSPIN220_ERROR = -1 } |
STSPIN220 Click return value data. More... | |
Functions | |
void | stspin220_cfg_setup (stspin220_cfg_t *cfg) |
STSPIN220 configuration object setup function. | |
err_t | stspin220_init (stspin220_t *ctx, stspin220_cfg_t *cfg) |
STSPIN220 initialization function. | |
void | stspin220_default_cfg (stspin220_t *ctx) |
STSPIN220 default configuration function. | |
void | stspin220_drive_motor (stspin220_t *ctx, uint32_t steps, uint8_t speed) |
STSPIN220 drive motor function. | |
void | stspin220_enable_device (stspin220_t *ctx) |
STSPIN220 enable device function. | |
void | stspin220_disable_device (stspin220_t *ctx) |
STSPIN220 disable device function. | |
void | stspin220_set_direction (stspin220_t *ctx, uint8_t dir) |
STSPIN220 set direction function. | |
void | stspin220_switch_direction (stspin220_t *ctx) |
STSPIN220 switch direction function. | |
void | stspin220_reset_device (stspin220_t *ctx) |
STSPIN220 reset device function. | |
void | stspin220_set_rst_pin (stspin220_t *ctx, uint8_t state) |
STSPIN220 set rst pin function. | |
uint8_t | stspin220_get_fault_pin (stspin220_t *ctx) |
STSPIN220 get fault pin function. | |
void | stspin220_set_step_pin (stspin220_t *ctx, uint8_t state) |
STSPIN220 set step pin function. | |
This file contains API for STSPIN220 Click Driver.