dcmotor 2.0.0.0
Public function

Functions

void dcmotor_cfg_setup (dcmotor_cfg_t *cfg)
 Config Object Initialization function.
 
DCMOTOR_RETVAL dcmotor_init (dcmotor_t *ctx, dcmotor_cfg_t *cfg)
 Initialization function.
 
void dcmotor_set_duty_cycle (dcmotor_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void dcmotor_pwm_stop (dcmotor_t *ctx)
 Stop PWM module.
 
void dcmotor_pwm_start (dcmotor_t *ctx)
 Start PWM module.
 
void dcmotor_enable (dcmotor_t *ctx)
 Enable the motor function.
 
void dcmotor_sleep_mode (dcmotor_t *ctx)
 Set sleep mode function.
 
void dcmotor_left_direction_fast (dcmotor_t *ctx)
 Select left direction, fast decay function.
 
void dcmotor_right_direction_fast (dcmotor_t *ctx)
 Select right direction, fast decay function.
 
void dcmotor_left_direction_slow (dcmotor_t *ctx)
 Select left direction, slow decay function.
 
void dcmotor_right_direction_slow (dcmotor_t *ctx)
 Select right direction, slow decay function.
 
uint8_t dcmotor_get_diagnostic (dcmotor_t *ctx)
 Get diagnostic function.
 

Detailed Description

Function Documentation

◆ dcmotor_cfg_setup()

void dcmotor_cfg_setup ( dcmotor_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.

◆ dcmotor_enable()

void dcmotor_enable ( dcmotor_t * ctx)

Enable the motor function.

Parameters
ctxClick object.

@description This function enable the motor.

◆ dcmotor_get_diagnostic()

uint8_t dcmotor_get_diagnostic ( dcmotor_t * ctx)

Get diagnostic function.

Parameters
ctxClick object.

@description Function get diagnostic by return state of pin.

◆ dcmotor_init()

DCMOTOR_RETVAL dcmotor_init ( dcmotor_t * ctx,
dcmotor_cfg_t * cfg )

Initialization function.

Parameters
dcmotorClick object.
cfgClick configuration structure.

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

◆ dcmotor_left_direction_fast()

void dcmotor_left_direction_fast ( dcmotor_t * ctx)

Select left direction, fast decay function.

Parameters
ctxClick object.

@description Function select left direction, fast decay speed.

◆ dcmotor_left_direction_slow()

void dcmotor_left_direction_slow ( dcmotor_t * ctx)

Select left direction, slow decay function.

Parameters
ctxClick object.

@description Function select left direction, slow decay speed.

◆ dcmotor_pwm_start()

void dcmotor_pwm_start ( dcmotor_t * ctx)

Start PWM module.

Parameters
ctxClick object.

@description This function starts PWM module.

◆ dcmotor_pwm_stop()

void dcmotor_pwm_stop ( dcmotor_t * ctx)

Stop PWM module.

Parameters
ctxClick object.

@description This function stops PWM module.

◆ dcmotor_right_direction_fast()

void dcmotor_right_direction_fast ( dcmotor_t * ctx)

Select right direction, fast decay function.

Parameters
ctxClick object.

@description Function select right direction, fast decay speed.

◆ dcmotor_right_direction_slow()

void dcmotor_right_direction_slow ( dcmotor_t * ctx)

Select right direction, slow decay function.

Parameters
ctxClick object.

@description Function select right direction, slow decay speed.

◆ dcmotor_set_duty_cycle()

void dcmotor_set_duty_cycle ( dcmotor_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle.

◆ dcmotor_sleep_mode()

void dcmotor_sleep_mode ( dcmotor_t * ctx)

Set sleep mode function.

Parameters
ctxClick object.

@description This function set sleep mode the motor.