brushless17 2.0.0.0
Brushless 17 Click Driver

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

Topics

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

Functions

void brushless17_cfg_setup (brushless17_cfg_t *cfg)
 Brushless 17 configuration object setup function.
 
err_t brushless17_init (brushless17_t *ctx, brushless17_cfg_t *cfg)
 Brushless 17 initialization function.
 
err_t brushless17_default_cfg (brushless17_t *ctx)
 Brushless 17 default configuration function.
 
err_t brushless17_set_duty_cycle (brushless17_t *ctx, float duty_cycle)
 Brushless 17 sets PWM duty cycle.
 
err_t brushless17_pwm_stop (brushless17_t *ctx)
 Brushless 17 stop PWM module.
 
err_t brushless17_pwm_start (brushless17_t *ctx)
 Brushless 17 start PWM module.
 
void brushless17_enable_chip (brushless17_t *ctx)
 Brushless 17 enable chip function.
 
void brushless17_disable_chip (brushless17_t *ctx)
 Brushless 17 disable chip function.
 
void brushless17_set_direction (brushless17_t *ctx, uint8_t dir)
 Brushless 17 set direction function.
 
void brushless17_switch_direction (brushless17_t *ctx)
 Brushless 17 switch direction function.
 
void brushless17_pull_brake (brushless17_t *ctx)
 Brushless 17 pull brake function.
 
void brushless17_release_brake (brushless17_t *ctx)
 Brushless 17 release brake function.
 
uint8_t brushless17_get_diagnostic_pin (brushless17_t *ctx)
 Brushless 17 get diagnostic pin function.
 

Detailed Description

API for configuring and manipulating Brushless 17 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

◆ brushless17_cfg_setup()

void brushless17_cfg_setup ( brushless17_cfg_t * cfg)

Brushless 17 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ brushless17_default_cfg()

err_t brushless17_default_cfg ( brushless17_t * ctx)

Brushless 17 default configuration function.

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

Parameters
[in]ctx: Click context object. See brushless17_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.

◆ brushless17_disable_chip()

void brushless17_disable_chip ( brushless17_t * ctx)

Brushless 17 disable chip function.

This function disables the chip by setting the EN pin to low logic state.

Parameters
[in]ctx: Click context object. See brushless17_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ brushless17_enable_chip()

void brushless17_enable_chip ( brushless17_t * ctx)

Brushless 17 enable chip function.

This function enables the chip by setting the EN pin to high logic state.

Parameters
[in]ctx: Click context object. See brushless17_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ brushless17_get_diagnostic_pin()

uint8_t brushless17_get_diagnostic_pin ( brushless17_t * ctx)

Brushless 17 get diagnostic pin function.

This function returns the DIAG pin logic state.

Parameters
[in]ctx: Click context object. See brushless17_t object definition for detailed explanation.
Returns
  • 0 - An overcurrent or overtemperature event has occured,
  • 1 - Normal operation.
Note
None.

◆ brushless17_init()

err_t brushless17_init ( brushless17_t * ctx,
brushless17_cfg_t * cfg )

Brushless 17 initialization function.

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

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

◆ brushless17_pull_brake()

void brushless17_pull_brake ( brushless17_t * ctx)

Brushless 17 pull brake function.

This function pulls brake by setting the BRK pin to low logic state.

Parameters
[in]ctx: Click context object. See brushless17_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ brushless17_pwm_start()

err_t brushless17_pwm_start ( brushless17_t * ctx)

Brushless 17 start PWM module.

This function starts the PWM module output.

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

◆ brushless17_pwm_stop()

err_t brushless17_pwm_stop ( brushless17_t * ctx)

Brushless 17 stop PWM module.

This function stops the PWM module output.

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

◆ brushless17_release_brake()

void brushless17_release_brake ( brushless17_t * ctx)

Brushless 17 release brake function.

This function releases brake by setting the BRK pin to high logic state.

Parameters
[in]ctx: Click context object. See brushless17_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ brushless17_set_direction()

void brushless17_set_direction ( brushless17_t * ctx,
uint8_t dir )

Brushless 17 set direction function.

This function sets the motor direction.

Parameters
[in]ctx: Click context object. See brushless17_t object definition for detailed explanation.
[in]dir
  • 0 - Counter Clockwise,
  • 1 - Clockwise.
Returns
None.
Note
None.

◆ brushless17_set_duty_cycle()

err_t brushless17_set_duty_cycle ( brushless17_t * ctx,
float duty_cycle )

Brushless 17 sets PWM duty cycle.

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

Parameters
[in]ctx: Click context object. See brushless17_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.

◆ brushless17_switch_direction()

void brushless17_switch_direction ( brushless17_t * ctx)

Brushless 17 switch direction function.

This function switches the direction by toggling the DIR pin state.

Parameters
[in]ctx: Click context object. See brushless17_t object definition for detailed explanation.
Returns
None.
Note
None.