stspin820 2.1.0.0
|
This file contains API for STSPIN820 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
Go to the source code of this file.
Data Structures | |
struct | stspin820_t |
STSPIN820 Click context object. More... | |
struct | stspin820_cfg_t |
STSPIN820 Click configuration object. More... | |
Macros | |
#define | STSPIN820_DIR_CW 0 |
STSPIN820 direction setting. | |
#define | STSPIN820_DIR_CCW 1 |
#define | STSPIN820_PIN_LOW_LEVEL 0 |
STSPIN820 pin logic level setting. | |
#define | STSPIN820_PIN_HIGH_LEVEL 1 |
#define | STSPIN820_SPEED_VERY_SLOW 0 |
STSPIN820 device speed settings. | |
#define | STSPIN820_SPEED_SLOW 1 |
#define | STSPIN820_SPEED_MEDIUM 2 |
#define | STSPIN820_SPEED_FAST 3 |
#define | STSPIN820_SPEED_VERY_FAST 4 |
#define | STSPIN820_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | stspin820_return_value_t { STSPIN820_OK = 0 , STSPIN820_ERROR = -1 } |
STSPIN820 Click return value data. More... | |
Functions | |
void | stspin820_cfg_setup (stspin820_cfg_t *cfg) |
STSPIN820 configuration object setup function. | |
err_t | stspin820_init (stspin820_t *ctx, stspin820_cfg_t *cfg) |
STSPIN820 initialization function. | |
void | stspin820_default_cfg (stspin820_t *ctx) |
STSPIN820 default configuration function. | |
void | stspin820_drive_motor (stspin820_t *ctx, uint32_t steps, uint8_t speed) |
STSPIN820 drive motor function. | |
void | stspin820_enable_device (stspin820_t *ctx) |
STSPIN820 enable device function. | |
void | stspin820_disable_device (stspin820_t *ctx) |
STSPIN820 disable device function. | |
void | stspin820_set_direction (stspin820_t *ctx, uint8_t dir) |
STSPIN820 set direction function. | |
void | stspin820_switch_direction (stspin820_t *ctx) |
STSPIN820 switch direction function. | |
void | stspin820_reset_device (stspin820_t *ctx) |
STSPIN820 reset device function. | |
void | stspin820_set_rst_pin (stspin820_t *ctx, uint8_t state) |
STSPIN820 set rst pin function. | |
uint8_t | stspin820_get_fault_pin (stspin820_t *ctx) |
STSPIN820 get fault pin function. | |
void | stspin820_set_step_pin (stspin820_t *ctx, uint8_t state) |
STSPIN820 set step pin function. | |
This file contains API for STSPIN820 Click Driver.