brushless2 2.0.0.0

Functions

void brushless2_cfg_setup (brushless2_cfg_t *cfg)
 Config Object Initialization function.
 
BRUSHLESS2_RETVAL brushless2_init (brushless2_t *ctx, brushless2_cfg_t *cfg)
 Initialization function.
 
void brushless2_set_duty_cycle (brushless2_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void brushless2_pwm_stop (brushless2_t *ctx)
 Stop PWM module.
 
void brushless2_pwm_start (brushless2_t *ctx)
 Start PWM module.
 
void brushless2_counter_clockwise (brushless2_t *ctx)
 Set the direction of rotation in the counterclockwise direction function.
 
void brushless2_clockwise (brushless2_t *ctx)
 Set the direction of rotation in the clockwise direction function.
 
void brushless2_invert_direction (brushless2_t *ctx)
 Invert the direction of rotation.
 
uint8_t brushless2_get_interrupt_status (brushless2_t *ctx)
 Get Interrupt pin state function.
 

Detailed Description

Function Documentation

◆ brushless2_cfg_setup()

void brushless2_cfg_setup ( brushless2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ brushless2_clockwise()

void brushless2_clockwise ( brushless2_t * ctx)

Set the direction of rotation in the clockwise direction function.

Parameters
ctxClick object.

@description Function set the direction of rotation in the clockwise direction by set RST pin on Brushless 2 Click board.

◆ brushless2_counter_clockwise()

void brushless2_counter_clockwise ( brushless2_t * ctx)

Set the direction of rotation in the counterclockwise direction function.

Parameters
ctxClick object.

@description Function set the direction of rotation in the counterclockwise direction by claer RST pin on Brushless 2 Click board.

◆ brushless2_get_interrupt_status()

uint8_t brushless2_get_interrupt_status ( brushless2_t * ctx)

Get Interrupt pin state function.

Parameters
ctxClick object.
Returns
Interrupt pin state
  • 0 : no active;
  • 1 : active;

@description Function get Interrupt ( INT ) pin state of Brushless 2 Click board.

◆ brushless2_init()

BRUSHLESS2_RETVAL brushless2_init ( brushless2_t * ctx,
brushless2_cfg_t * cfg )

Initialization function.

Parameters
brushless2Click object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ brushless2_invert_direction()

void brushless2_invert_direction ( brushless2_t * ctx)

Invert the direction of rotation.

Parameters
ctxClick object.

@description Function inverts the direction of rotation by toggling the RST pin on Brushless 2 Click board.

◆ brushless2_pwm_start()

void brushless2_pwm_start ( brushless2_t * ctx)

Start PWM module.

Parameters
ctxClick object.

@description This function starts PWM module.

◆ brushless2_pwm_stop()

void brushless2_pwm_stop ( brushless2_t * ctx)

Stop PWM module.

Parameters
ctxClick object.

@description This function stops PWM module.

◆ brushless2_set_duty_cycle()

void brushless2_set_duty_cycle ( brushless2_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle.