brushless12 2.0.0.0
Brushless 12 Click Driver

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

Topics

 Brushless 12 pins setting flags.
 Pins setting flags for Brushless 12 Click driver.
 
 Brushless 12 MikroBUS Map
 MikroBUS pin mapping of Brushless 12 Click driver.
 

Macros

#define BRUSHLESS12_ENABLE   1
 
#define BRUSHLESS12_DISABLE   0
 
#define BRUSHLESS12_START   1
 
#define BRUSHLESS12_BRAKE   0
 
#define BRUSHLESS12_DIR_FORWARD   1
 
#define BRUSHLESS12_DIR_REVERSE   0
 

Functions

void brushless12_cfg_setup (brushless12_cfg_t *cfg)
 Brushless 12 configuration object setup function.
 
err_t brushless12_init (brushless12_t *ctx, brushless12_cfg_t *cfg)
 Brushless 12 initialization function.
 
err_t brushless12_default_cfg (brushless12_t *ctx)
 Brushless 12 default configuration function.
 
void brushless12_set_brake (brushless12_t *ctx, uint8_t state)
 Brushless 12 set BRK pin state function.
 
void brushless12_set_direction (brushless12_t *ctx, uint8_t state)
 Brushless 12 set F/R pin state function.
 
void brushless12_set_enable (brushless12_t *ctx, uint8_t state)
 Brushless 12 set EN pin state function.
 

Detailed Description

API for configuring and manipulating Brushless 12 Click driver.

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

Macro Definition Documentation

◆ BRUSHLESS12_BRAKE

#define BRUSHLESS12_BRAKE   0

◆ BRUSHLESS12_DIR_FORWARD

#define BRUSHLESS12_DIR_FORWARD   1

◆ BRUSHLESS12_DIR_REVERSE

#define BRUSHLESS12_DIR_REVERSE   0

◆ BRUSHLESS12_DISABLE

#define BRUSHLESS12_DISABLE   0

◆ BRUSHLESS12_ENABLE

#define BRUSHLESS12_ENABLE   1

◆ BRUSHLESS12_START

#define BRUSHLESS12_START   1

Function Documentation

◆ brushless12_cfg_setup()

void brushless12_cfg_setup ( brushless12_cfg_t * cfg)

Brushless 12 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ brushless12_default_cfg()

err_t brushless12_default_cfg ( brushless12_t * ctx)

Brushless 12 default configuration function.

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

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

◆ brushless12_init()

err_t brushless12_init ( brushless12_t * ctx,
brushless12_cfg_t * cfg )

Brushless 12 initialization function.

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

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

◆ brushless12_set_brake()

void brushless12_set_brake ( brushless12_t * ctx,
uint8_t state )

Brushless 12 set BRK pin state function.

This function sets the BRK pin to the desired state.

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

◆ brushless12_set_direction()

void brushless12_set_direction ( brushless12_t * ctx,
uint8_t state )

Brushless 12 set F/R pin state function.

This function sets the F/R pin to the desired state.

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

◆ brushless12_set_enable()

void brushless12_set_enable ( brushless12_t * ctx,
uint8_t state )

Brushless 12 set EN pin state function.

This function sets the EN pin to the desired state.

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