brushless11 2.1.0.0
Brushless 11 Click Driver

API for configuring and manipulating Brushless 11 Click driver. More...

Topics

 Brushless 11 PWM Settings
 Settings for configuration of Brushless 11 Click driver.
 
 Brushless 11 MikroBUS Map
 MikroBUS pin mapping of Brushless 11 Click driver.
 

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

API for configuring and manipulating Brushless 11 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ brushless11_cfg_setup()

void brushless11_cfg_setup ( brushless11_cfg_t * cfg)

Brushless 11 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See brushless11_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ brushless11_default_cfg()

err_t brushless11_default_cfg ( brushless11_t * ctx)

Brushless 11 default configuration function.

This function executes a default configuration of Brushless 11 click board.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ brushless11_get_fg1_pin()

uint8_t brushless11_get_fg1_pin ( brushless11_t * ctx)

Brushless 11 get FG1 pin state function.

This function is used to get state of the FG1 pin.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
Returns
  • 0 - Pin state low,
  • 1 - Pin state high.
Note
None.

◆ brushless11_get_fg2_pin()

uint8_t brushless11_get_fg2_pin ( brushless11_t * ctx)

Brushless 11 get FG2 pin state function.

This function is used to get state of the FG2 pin.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
Returns
  • 0 - Pin state low,
  • 1 - Pin state high.
Note
None.

◆ brushless11_init()

err_t brushless11_init ( brushless11_t * ctx,
brushless11_cfg_t * cfg )

Brushless 11 initialization function.

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

Parameters
[out]ctx: Click context object. See brushless11_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See brushless11_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ brushless11_pwm_start()

err_t brushless11_pwm_start ( brushless11_t * ctx)

Brushless 11 start PWM module.

This function starts the PWM module output.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ brushless11_pwm_stop()

err_t brushless11_pwm_stop ( brushless11_t * ctx)

Brushless 11 stop PWM module.

This function stops the PWM module output.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ brushless11_set_brake()

void brushless11_set_brake ( brushless11_t * ctx,
uint8_t brake_state )

Brushless 11 set motor brake state function.

This function is used to set state of the motor brake.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
[in]brake_state: State of the motor brake.
Returns
Nothing.
Note
None.

◆ brushless11_set_brk_pin()

void brushless11_set_brk_pin ( brushless11_t * ctx,
uint8_t pin_state )

Brushless 11 set BRK pin state function.

This function is used to set state of the BRK pin.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
[in]pin_state: State of the BRK pin.
Returns
Nothing.
Note
None.

◆ brushless11_set_duty_cycle()

err_t brushless11_set_duty_cycle ( brushless11_t * ctx,
float duty_cycle )

Brushless 11 sets PWM duty cycle.

This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
[in]duty_cycle: PWM duty cycle.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ brushless11_set_speed()

err_t brushless11_set_speed ( brushless11_t * ctx,
uint8_t speed )

Brushless 11 set motor speed.

This function is used to set motor speed.

Parameters
[in]ctx: Click context object. See brushless11_t object definition for detailed explanation.
[in]speed: Motor speed.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.