dcmotor2 2.0.0.0
|
This file contains API for DC Motor 2 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_pwm.h"
Go to the source code of this file.
Data Structures | |
struct | dcmotor2_t |
Click ctx object definition. More... | |
struct | dcmotor2_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | DCMOTOR2_MAP_MIKROBUS(cfg, mikrobus) |
#define | DCMOTOR2_RETVAL uint8_t |
#define | DCMOTOR2_OK 0x00 |
#define | DCMOTOR2_INIT_ERROR 0xFF |
#define | DCMOTOR2_DEF_FREQ 160000 |
Functions | |
void | dcmotor2_cfg_setup (dcmotor2_cfg_t *cfg) |
Config Object Initialization function. | |
DCMOTOR2_RETVAL | dcmotor2_init (dcmotor2_t *ctx, dcmotor2_cfg_t *cfg) |
Initialization function. | |
void | dcmotor2_set_duty_cycle (dcmotor2_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. | |
void | dcmotor2_pwm_stop (dcmotor2_t *ctx) |
Stop PWM module. | |
void | dcmotor2_pwm_start (dcmotor2_t *ctx) |
Start PWM module. | |
void | dcmotor2_enable_motor (dcmotor2_t *ctx) |
Enable motor. | |
void | dcmotor2_disable_motor (dcmotor2_t *ctx) |
Disable motor. | |
void | dcmotor2_spin_clockwise (dcmotor2_t *ctx) |
Spin motor clockwise. | |
void | dcmotor2_spin_counter_clockwise (dcmotor2_t *ctx) |
Spin motor counter clockwise. | |
void | dcmotor2_pull_brake (dcmotor2_t *ctx) |
Pull motor brake. | |
void | dcmotor2_stop_motor (dcmotor2_t *ctx) |
Stop motor clockwise. | |
This file contains API for DC Motor 2 Click driver.