brushless6 2.0.0.0
brushless6.h File Reference

This file contains API for Brushless 6 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  brushless6_t
 Click ctx object definition. More...
 
struct  brushless6_cfg_t
 Click configuration structure definition. More...
 

Macros

#define BRUSHLESS6_MAP_MIKROBUS(cfg, mikrobus)    cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
 
#define BRUSHLESS6_RETVAL   uint8_t
 
#define BRUSHLESS6_OK   0x00
 
#define BRUSHLESS6_INIT_ERROR   0xFF
 
#define BRUSHLESS6_DEF_FREQ   500
 
#define BRUSHLESS6_COEF   1.0 / ( ( 1000000.0 / BRUSHLESS6_DEF_FREQ ) / 0.3048 )
 
#define BRUSHLESS6_MIN_PWM_DC   BRUSHLESS6_COEF * 2000.0
 
#define BRUSHLESS6_INIT_DC   BRUSHLESS6_COEF * 4855.0
 
#define BRUSHLESS6_1MS_DC   BRUSHLESS6_MIN_PWM_DC / 0.608
 
#define BRUSHLESS6_2MS_DC   BRUSHLESS6_1MS_DC * 2.0
 
#define BRUSHLESS6_PERIOD   BRUSHLESS6_1MS_DC / 10.0
 

Functions

void brushless6_cfg_setup (brushless6_cfg_t *cfg)
 Config Object Initialization function.
 
BRUSHLESS6_RETVAL brushless6_init (brushless6_t *ctx, brushless6_cfg_t *cfg)
 Initialization function.
 
void brushless6_set_duty_cycle (brushless6_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void brushless6_pwm_stop (brushless6_t *ctx)
 Stop PWM module.
 
void brushless6_pwm_start (brushless6_t *ctx)
 Start PWM module.
 

Detailed Description

This file contains API for Brushless 6 Click driver.