dcmotor5 2.0.0.0
dcmotor5.h File Reference

This file contains API for DC Motor 5 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  dcmotor5_t
 DC Motor 5 Click context object. More...
 
struct  dcmotor5_cfg_t
 DC Motor 5 Click configuration object. More...
 

Macros

#define DCMOTOR5_DEF_FREQ   20000
 DC Motor 5 default PWM frequency.
 
#define DCMOTOR5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  dcmotor5_return_value_t { DCMOTOR5_OK = 0 , DCMOTOR5_ERROR = -1 }
 DC Motor 5 Click return value data. More...
 

Functions

void dcmotor5_cfg_setup (dcmotor5_cfg_t *cfg)
 DC Motor 5 configuration object setup function.
 
err_t dcmotor5_init (dcmotor5_t *ctx, dcmotor5_cfg_t *cfg)
 DC Motor 5 initialization function.
 
void dcmotor5_default_cfg (dcmotor5_t *ctx)
 DC Motor 5 default configuration function.
 
void dcmotor5_set_duty_cycle (dcmotor5_t *ctx, float duty_cycle)
 DC Motor 5 sets PWM duty cycle.
 
void dcmotor5_pwm_stop (dcmotor5_t *ctx)
 DC Motor 5 stop PWM module.
 
void dcmotor5_pwm_start (dcmotor5_t *ctx)
 DC Motor 5 start PWM module.
 
void dcmotor5_enable (dcmotor5_t *ctx)
 DC Motor 5 start PWM module.
 
void dcmotor5_standby (dcmotor5_t *ctx)
 DC Motor 5 Disable the engine function.
 
void dcmotor5_counter_clockwise (dcmotor5_t *ctx)
 DC Motor 5 Set the direction of rotation in the counter clockwise direction function.
 
void dcmotor5_clockwise (dcmotor5_t *ctx)
 DC Motor 5 Set the direction of rotation in the clockwise direction function.
 
void dcmotor5_short_brake (dcmotor5_t *ctx)
 DC Motor 5 brake the engine function.
 
void dcmotor5_stop (dcmotor5_t *ctx)
 DC Motor 5 stop the engine function.
 
uint8_t dcmotor5_get_fault_conditions (dcmotor5_t *ctx)
 DC Motor 5 get fault conditions state function.
 
uint8_t dcmotor5_get_sense_comparator (dcmotor5_t *ctx)
 DC Motor 5 get sense comparator.
 

Detailed Description

This file contains API for DC Motor 5 Click Driver.

Enumeration Type Documentation

◆ dcmotor5_return_value_t

DC Motor 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
DCMOTOR5_OK 
DCMOTOR5_ERROR