dcmotor4 2.0.0.0
dcmotor4.h File Reference

This file contains API for DC Motor 4 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  dcmotor4_t
 Click ctx object definition. More...
 
struct  dcmotor4_cfg_t
 Click configuration structure definition. More...
 

Macros

#define DCMOTOR4_MAP_MIKROBUS(cfg, mikrobus)
 
#define DCMOTOR4_RETVAL   uint8_t
 
#define DCMOTOR4_OK   0x00
 
#define DCMOTOR4_INIT_ERROR   0xFF
 
#define DCMOTOR4_DEF_FREQ   10000
 

Functions

void dcmotor4_cfg_setup (dcmotor4_cfg_t *cfg)
 Config Object Initialization function.
 
DCMOTOR4_RETVAL dcmotor4_init (dcmotor4_t *ctx, dcmotor4_cfg_t *cfg)
 Initialization function.
 
void dcmotor4_set_duty_cycle (dcmotor4_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void dcmotor4_pwm_stop (dcmotor4_t *ctx)
 Stop PWM module.
 
void dcmotor4_pwm_start (dcmotor4_t *ctx)
 Start PWM module.
 
void dcmotor4_run_clockwise (dcmotor4_t *ctx)
 Run clockwise.
 
void dcmotor4_run_counter_clockwise (dcmotor4_t *ctx)
 Run counter clockwise.
 
void dcmotor4_enable_motor (dcmotor4_t *ctx)
 Enable motor.
 
void dcmotor4_disable_motor (dcmotor4_t *ctx)
 Disable motor.
 
uint8_t dcmotor4_get_diagnostic (dcmotor4_t *ctx)
 Get diagnostic.
 

Detailed Description

This file contains API for DC Motor 4 Click driver.