dcmotor3 2.0.0.0

Functions

void dcmotor3_cfg_setup (dcmotor3_cfg_t *cfg)
 Config Object Initialization function.
 
DCMOTOR3_RETVAL dcmotor3_init (dcmotor3_t *ctx, dcmotor3_cfg_t *cfg)
 Initialization function.
 
void dcmotor3_set_duty_cycle (dcmotor3_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void dcmotor3_pwm_stop (dcmotor3_t *ctx)
 Stop PWM module.
 
void dcmotor3_pwm_start (dcmotor3_t *ctx)
 Start PWM module.
 
void dcmotor3_enable (dcmotor3_t *ctx)
 Enable the engine function.
 
void dcmotor3_standby (dcmotor3_t *ctx)
 Disable the engine function.
 
void dcmotor3_counter_clockwise (dcmotor3_t *ctx)
 Set the direction of rotation in the counter clockwise direction function.
 
void dcmotor3_clockwise (dcmotor3_t *ctx)
 Set the direction of rotation in the clockwise direction function.
 
void dcmotor3_short_brake (dcmotor3_t *ctx)
 Brake the engine function.
 
void dcmotor3_stop (dcmotor3_t *ctx)
 Stop the engine function.
 

Detailed Description

Function Documentation

◆ dcmotor3_cfg_setup()

void dcmotor3_cfg_setup ( dcmotor3_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.

◆ dcmotor3_clockwise()

void dcmotor3_clockwise ( dcmotor3_t * ctx)

Set the direction of rotation in the clockwise direction function.

Parameters
ctxClick object.

@description This function set the direction of rotation in the clockwise direction by sets AN pin and clear RST pin on DC Motor 3 Click board.

◆ dcmotor3_counter_clockwise()

void dcmotor3_counter_clockwise ( dcmotor3_t * ctx)

Set the direction of rotation in the counter clockwise direction function.

Parameters
ctxClick object.

@description This function set the direction of rotation in the counter clockwise direction by clear AN pin and sets RST pin on DC Motor 3 Click board.

◆ dcmotor3_enable()

void dcmotor3_enable ( dcmotor3_t * ctx)

Enable the engine function.

Parameters
ctxClick object.

@description This function enable the engine by set CS pin on DC Motor 3 Click board.

◆ dcmotor3_init()

DCMOTOR3_RETVAL dcmotor3_init ( dcmotor3_t * ctx,
dcmotor3_cfg_t * cfg )

Initialization function.

Parameters
dcmotor3Click object.
cfgClick configuration structure.

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

◆ dcmotor3_pwm_start()

void dcmotor3_pwm_start ( dcmotor3_t * ctx)

Start PWM module.

Parameters
ctxClick object.

@description This function starts PWM module.

◆ dcmotor3_pwm_stop()

void dcmotor3_pwm_stop ( dcmotor3_t * ctx)

Stop PWM module.

Parameters
ctxClick object.

@description This function stops PWM module.

◆ dcmotor3_set_duty_cycle()

void dcmotor3_set_duty_cycle ( dcmotor3_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle.

◆ dcmotor3_short_brake()

void dcmotor3_short_brake ( dcmotor3_t * ctx)

Brake the engine function.

Parameters
ctxClick object.

@description This function brake the engine by sets AN and RST pins on DC Motor 3 Click board.

◆ dcmotor3_standby()

void dcmotor3_standby ( dcmotor3_t * ctx)

Disable the engine function.

Parameters
ctxClick object.

@description This function disable the engine by clear CS pin on DC Motor 3 Click board.

◆ dcmotor3_stop()

void dcmotor3_stop ( dcmotor3_t * ctx)

Stop the engine function.

Parameters
ctxClick object.

@description This function stop the engine by sets AN and RST pins on DC Motor 3 Click board.