brushless7 2.0.0.0

Functions

void brushless7_cfg_setup (brushless7_cfg_t *cfg)
 Config Object Initialization function.
 
BRUSHLESS7_RETVAL brushless7_init (brushless7_t *ctx, brushless7_cfg_t *cfg)
 Initialization function.
 
void brushless7_default_cfg (brushless7_t *ctx)
 Click Default Configuration function.
 
void brushless7_generic_write (brushless7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void brushless7_generic_read (brushless7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void brushless7_set_sby_pin_state (brushless7_t *ctx, uint8_t state)
 Generic function for setting SBY pin state.
 
void brushless7_toggle_dir_pin_state (brushless7_t *ctx)
 Generic function for toggling DIR pin state.
 
uint8_t brushless7_get_int_pin_state (brushless7_t *ctx)
 Generic function for getting INT pin state.
 
uint8_t brushless7_start_duty (brushless7_t *ctx, float duty_ptc)
 Function for setting start duty of device.
 
uint8_t brushless7_stop_duty (brushless7_t *ctx, float duty_ptc)
 Function for setting stop duty of device.
 
uint8_t brushless7_change_duty (brushless7_t *ctx, float duty_ptc)
 Function for changeing duty of device.
 
uint8_t brushless7_max_duty (brushless7_t *ctx, float duty_ptc)
 Function for setting max duty of device.
 
uint8_t brushless7_start_rpm (brushless7_t *ctx, uint16_t rpm_val)
 Function for setting start rpm parameter of device.
 
uint8_t brushless7_max_speed_rpm (brushless7_t *ctx, uint8_t max_speed_rpm)
 Function for setting max rpm parameter of device.
 
uint8_t brushless7_rotating_direction (brushless7_t *ctx, uint8_t direction_rot)
 Function for setting rotation direction.
 
uint8_t brushless7_control_mode_set (brushless7_t *ctx, uint8_t ctrl_type)
 Function for setting type of device control.
 
void brushless7_set_duty_cycle (brushless7_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void brushless7_pwm_stop (brushless7_t *ctx)
 Stop PWM module.
 
void brushless7_pwm_start (brushless7_t *ctx)
 Start PWM module.
 

Detailed Description

Function Documentation

◆ brushless7_cfg_setup()

void brushless7_cfg_setup ( brushless7_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.

◆ brushless7_change_duty()

uint8_t brushless7_change_duty ( brushless7_t * ctx,
float duty_ptc )

Function for changeing duty of device.

Parameters
ctxClick object.
duty_ptcduty in percentage
Returns
One of two dev status.
Note
duty_ptc should be in range 0.4% to 99.6%

◆ brushless7_control_mode_set()

uint8_t brushless7_control_mode_set ( brushless7_t * ctx,
uint8_t ctrl_type )

Function for setting type of device control.

Parameters
ctxClick object.
ctrl_typelibrary macro
Returns
One of two dev status.

◆ brushless7_default_cfg()

void brushless7_default_cfg ( brushless7_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Brushless7 click.

◆ brushless7_generic_read()

void brushless7_generic_read ( brushless7_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ brushless7_generic_write()

void brushless7_generic_write ( brushless7_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ brushless7_get_int_pin_state()

uint8_t brushless7_get_int_pin_state ( brushless7_t * ctx)

Generic function for getting INT pin state.

Parameters
ctxClick object.
Returns
State of the pin

◆ brushless7_init()

BRUSHLESS7_RETVAL brushless7_init ( brushless7_t * ctx,
brushless7_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ brushless7_max_duty()

uint8_t brushless7_max_duty ( brushless7_t * ctx,
float duty_ptc )

Function for setting max duty of device.

Parameters
ctxClick object.
duty_ptcduty in percentage
Returns
One of two dev status.
Note
duty_ptc should be in range 50.2% to 100%

◆ brushless7_max_speed_rpm()

uint8_t brushless7_max_speed_rpm ( brushless7_t * ctx,
uint8_t max_speed_rpm )

Function for setting max rpm parameter of device.

Parameters
ctxClick object.
max_speed_rpmlibrary macro
Returns
One of two dev status.

◆ brushless7_pwm_start()

void brushless7_pwm_start ( brushless7_t * ctx)

Start PWM module.

Parameters
ctxClick object.

@description This function starts PWM module.

◆ brushless7_pwm_stop()

void brushless7_pwm_stop ( brushless7_t * ctx)

Stop PWM module.

Parameters
ctxClick object.

@description This function stops PWM module.

◆ brushless7_rotating_direction()

uint8_t brushless7_rotating_direction ( brushless7_t * ctx,
uint8_t direction_rot )

Function for setting rotation direction.

Parameters
ctxClick object.
direction_rotlibrary macro
Returns
One of two dev status.

◆ brushless7_set_duty_cycle()

void brushless7_set_duty_cycle ( brushless7_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle.

◆ brushless7_set_sby_pin_state()

void brushless7_set_sby_pin_state ( brushless7_t * ctx,
uint8_t state )

Generic function for setting SBY pin state.

Parameters
ctxClick object.
statestate of the pin

◆ brushless7_start_duty()

uint8_t brushless7_start_duty ( brushless7_t * ctx,
float duty_ptc )

Function for setting start duty of device.

Parameters
ctxClick object.
duty_ptcduty in percentage
Returns
One of two dev status.
Note
duty_ptc should be in range 0% to 49.8%

◆ brushless7_start_rpm()

uint8_t brushless7_start_rpm ( brushless7_t * ctx,
uint16_t rpm_val )

Function for setting start rpm parameter of device.

Parameters
ctxClick object.
rpm_valvalue
Returns
One of two dev status.
Note
value should be in range 0 to 4095

◆ brushless7_stop_duty()

uint8_t brushless7_stop_duty ( brushless7_t * ctx,
float duty_ptc )

Function for setting stop duty of device.

Parameters
ctxClick object.
duty_ptcduty in percentage
Returns
One of two dev status.
Note
duty_ptc should be in range 0% to 49.6%

◆ brushless7_toggle_dir_pin_state()

void brushless7_toggle_dir_pin_state ( brushless7_t * ctx)

Generic function for toggling DIR pin state.

Parameters
ctxClick object.