brushless4 2.0.0.0
brushless4.h File Reference

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

Macros

#define BRUSHLESS4_MAP_MIKROBUS(cfg, mikrobus)
 
#define BRUSHLESS4_RETVAL   uint8_t
 
#define BRUSHLESS4_OK   0x00
 
#define BRUSHLESS4_INIT_ERROR   0xFF
 
#define BRUSHLESS4_DEF_FREQ   20000
 

Functions

void brushless4_cfg_setup (brushless4_cfg_t *cfg)
 Config Object Initialization function.
 
BRUSHLESS4_RETVAL brushless4_init (brushless4_t *ctx, brushless4_cfg_t *cfg)
 Initialization function.
 
void brushless4_default_cfg (brushless4_t *ctx)
 Click Default Configuration function.
 
void brushless4_set_duty_cycle (brushless4_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void brushless4_pwm_stop (brushless4_t *ctx)
 Stop PWM module.
 
void brushless4_pwm_start (brushless4_t *ctx)
 Start PWM module.
 
void brushless4_motor_parameters (brushless4_t *ctx, uint8_t poles, uint8_t slots)
 Setting the number of poles and number of slots.
 
uint16_t brushless4_get_speed (brushless4_t *ctx, uint16_t pulse_sample)
 Calculation of speed.
 
void brushless4_pwm_pin (brushless4_t *ctx, uint8_t state)
 Set the state of the PWM pin.
 
uint8_t brushless4_fg_get (brushless4_t *ctx)
 The state of the interrupt pin.
 

Detailed Description

This file contains API for Brushless 4 Click driver.