brushless24 2.1.0.0
Brushless 24 Click Driver

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

Topics

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

Functions

void brushless24_cfg_setup (brushless24_cfg_t *cfg)
 Brushless 24 configuration object setup function.
 
err_t brushless24_init (brushless24_t *ctx, brushless24_cfg_t *cfg)
 Brushless 24 initialization function.
 
err_t brushless24_default_cfg (brushless24_t *ctx)
 Brushless 24 default configuration function.
 
err_t brushless24_set_duty_cycle (brushless24_t *ctx, float duty_cycle)
 Brushless 24 sets PWM duty cycle.
 
err_t brushless24_pwm_stop (brushless24_t *ctx)
 Brushless 24 stop PWM module.
 
err_t brushless24_pwm_start (brushless24_t *ctx)
 Brushless 24 start PWM module.
 
uint8_t brushless24_get_int_state (brushless24_t *ctx)
 Brushless 24 get INT pin state.
 

Detailed Description

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

◆ brushless24_cfg_setup()

void brushless24_cfg_setup ( brushless24_cfg_t * cfg)

Brushless 24 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ brushless24_default_cfg()

err_t brushless24_default_cfg ( brushless24_t * ctx)

Brushless 24 default configuration function.

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

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

◆ brushless24_get_int_state()

uint8_t brushless24_get_int_state ( brushless24_t * ctx)

Brushless 24 get INT pin state.

This function reads state of the INT pin.

Parameters
[in]ctx: Click context object. See brushless24_t object definition for detailed explanation.
Returns
State of the INT pin.
Note
None.

◆ brushless24_init()

err_t brushless24_init ( brushless24_t * ctx,
brushless24_cfg_t * cfg )

Brushless 24 initialization function.

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

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

◆ brushless24_pwm_start()

err_t brushless24_pwm_start ( brushless24_t * ctx)

Brushless 24 start PWM module.

This function starts the PWM module output.

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

◆ brushless24_pwm_stop()

err_t brushless24_pwm_stop ( brushless24_t * ctx)

Brushless 24 stop PWM module.

This function stops the PWM module output.

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

◆ brushless24_set_duty_cycle()

err_t brushless24_set_duty_cycle ( brushless24_t * ctx,
float duty_cycle )

Brushless 24 sets PWM duty cycle.

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

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