dcmotor16 2.0.0.0
|
This file contains API for DC Motor 16 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | dcmotor16_t |
DC Motor 16 Click context object. More... | |
struct | dcmotor16_cfg_t |
DC Motor 16 Click configuration object. More... | |
Macros | |
#define | DCMOTOR16_DIR_FORWARD 0 |
DC Motor 16 description setting. | |
#define | DCMOTOR16_DIR_BACKWARD 1 |
#define | DCMOTOR16_ENABLE 1 |
#define | DCMOTOR16_DISABLE 0 |
#define | DCMOTOR16_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE |
Data sample selection. | |
#define | DCMOTOR16_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE |
#define | DCMOTOR16_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | dcmotor16_return_value_t { DCMOTOR16_OK = 0 , DCMOTOR16_ERROR = -1 } |
DC Motor 16 Click return value data. More... | |
Functions | |
void | dcmotor16_cfg_setup (dcmotor16_cfg_t *cfg) |
DC Motor 16 configuration object setup function. | |
err_t | dcmotor16_init (dcmotor16_t *ctx, dcmotor16_cfg_t *cfg) |
DC Motor 16 initialization function. | |
err_t | dcmotor16_generic_write (dcmotor16_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
DC Motor 16 data writing function. | |
err_t | dcmotor16_generic_read (dcmotor16_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
DC Motor 16 data reading function. | |
void | dcmotor16_set_direction (dcmotor16_t *ctx, uint8_t dir) |
Set motor direction. | |
void | dcmotor16_ctrl_fwd_pin (dcmotor16_t *ctx, uint8_t state) |
Control FWD pin. | |
void | dcmotor16_ctrl_rev_pin (dcmotor16_t *ctx, uint8_t state) |
Control REV pin. | |
void | dcmotor16_ctrl_vref (dcmotor16_t *ctx, uint16_t value) |
Control motor VRef (speed). | |
void | dcmotor16_stop (dcmotor16_t *ctx) |
Motor stop. | |
This file contains API for DC Motor 16 Click Driver.