brushless11 2.1.0.0
brushless11.h File Reference

This file contains API for Brushless 11 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  brushless11_t
 Brushless 11 Click context object. More...
 
struct  brushless11_cfg_t
 Brushless 11 Click configuration object. More...
 

Macros

#define BRUSHLESS11_DEF_FREQ   5000
 Brushless 11 default PWM frequency.
 
#define BRUSHLESS11_PIN_STATE_HIGH   0x01
 Brushless 11 pin states.
 
#define BRUSHLESS11_PIN_STATE_LOW   0x00
 
#define BRUSHLESS11_BRAKE_ON   0x01
 Brushless 11 brake states.
 
#define BRUSHLESS11_BRAKE_OFF   0x00
 
#define BRUSHLESS11_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  brushless11_return_value_t { BRUSHLESS11_OK = 0 , BRUSHLESS11_ERROR = -1 }
 Brushless 11 Click return value data. More...
 

Functions

void brushless11_cfg_setup (brushless11_cfg_t *cfg)
 Brushless 11 configuration object setup function.
 
err_t brushless11_init (brushless11_t *ctx, brushless11_cfg_t *cfg)
 Brushless 11 initialization function.
 
err_t brushless11_default_cfg (brushless11_t *ctx)
 Brushless 11 default configuration function.
 
err_t brushless11_set_duty_cycle (brushless11_t *ctx, float duty_cycle)
 Brushless 11 sets PWM duty cycle.
 
err_t brushless11_pwm_stop (brushless11_t *ctx)
 Brushless 11 stop PWM module.
 
err_t brushless11_pwm_start (brushless11_t *ctx)
 Brushless 11 start PWM module.
 
void brushless11_set_brk_pin (brushless11_t *ctx, uint8_t pin_state)
 Brushless 11 set BRK pin state function.
 
uint8_t brushless11_get_fg1_pin (brushless11_t *ctx)
 Brushless 11 get FG1 pin state function.
 
uint8_t brushless11_get_fg2_pin (brushless11_t *ctx)
 Brushless 11 get FG2 pin state function.
 
void brushless11_set_brake (brushless11_t *ctx, uint8_t brake_state)
 Brushless 11 set motor brake state function.
 
err_t brushless11_set_speed (brushless11_t *ctx, uint8_t speed)
 Brushless 11 set motor speed.
 

Detailed Description

This file contains API for Brushless 11 Click Driver.

Enumeration Type Documentation

◆ brushless11_return_value_t

Brushless 11 Click return value data.

Predefined enum values for driver return values.

Enumerator
BRUSHLESS11_OK 
BRUSHLESS11_ERROR