dcmotor7 2.0.0.0

Functions

void dcmotor7_cfg_setup (dcmotor7_cfg_t *cfg)
 Config Object Initialization function.
 
DCMOTOR7_RETVAL dcmotor7_init (dcmotor7_t *ctx, dcmotor7_cfg_t *cfg)
 Initialization function.
 
void dcmotor7_default_cfg (dcmotor7_t *ctx)
 Default Confuguration.
 
void dcmotor7_generic_write (dcmotor7_t *ctx, uint8_t reg, uint8_t tmp)
 Generic write function.
 
void dcmotor7_generic_read (dcmotor7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void dcmotor7_set_port (dcmotor7_t *ctx, uint8_t port, uint8_t value)
 Functions for set port.
 
void dcmotor7_set_motor (dcmotor7_t *ctx, uint8_t motor, uint8_t in1, uint8_t in2)
 Functions for set Motor.
 
void dcmotor7_set_tblkab (dcmotor7_t *ctx, uint8_t tblk)
 Functions for set Motor Ach and Bch Digital tBLK.
 
void dcmotor7_set_hb_mode (dcmotor7_t *ctx, uint8_t mode)
 Functions for set H-Bridge operation mode.
 
void dcmotor7_motor_stop (dcmotor7_t *ctx, uint8_t motor)
 Motor stop function.
 
void dcmotor7_go_to_stand_by_mode (dcmotor7_t *ctx, uint8_t motor)
 Function for setting the motor in stand mode.
 
void dcmotor7_set_pwm_motor_a (dcmotor7_t *ctx, uint8_t state)
 Function for set PWM value for motor A.
 
void dcmotor7_set_pwm_motor_b (dcmotor7_t *ctx, uint8_t state)
 Function for set PWM value for motor B.
 

Detailed Description

Function Documentation

◆ dcmotor7_cfg_setup()

void dcmotor7_cfg_setup ( dcmotor7_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.

◆ dcmotor7_default_cfg()

void dcmotor7_default_cfg ( dcmotor7_t * ctx)

Default Confuguration.

Parameters
ctxClick object.
Note
 Set: DCMOTOR7_CMD_CONFIGURATION
       - DCMOTOR7_ENABLE_ALL_OUTPUT_PORT
 Set: DCMOTOR7_PORT_0
       - DCMOTOR7_TBLK_FOSCM_X6_CLK
 Set: DCMOTOR7_PORT_5
       - DCMOTOR7_HBMODE_SMALL_MODE

@description This function is default configuration for this click.

◆ dcmotor7_generic_read()

void dcmotor7_generic_read ( dcmotor7_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ dcmotor7_generic_write()

void dcmotor7_generic_write ( dcmotor7_t * ctx,
uint8_t reg,
uint8_t tmp )

Generic write function.

Parameters
ctxClick object.
regRegister address.
tmpData buf to be written

@description This function writes data to the desired register.

◆ dcmotor7_go_to_stand_by_mode()

void dcmotor7_go_to_stand_by_mode ( dcmotor7_t * ctx,
uint8_t motor )

Function for setting the motor in stand mode.

Parameters
ctxClick object.
motorMotor (A or B)

◆ dcmotor7_init()

DCMOTOR7_RETVAL dcmotor7_init ( dcmotor7_t * ctx,
dcmotor7_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ dcmotor7_motor_stop()

void dcmotor7_motor_stop ( dcmotor7_t * ctx,
uint8_t motor )

Motor stop function.

Parameters
ctxClick object.
motorMotor (A or B)

◆ dcmotor7_set_hb_mode()

void dcmotor7_set_hb_mode ( dcmotor7_t * ctx,
uint8_t mode )

Functions for set H-Bridge operation mode.

Parameters
ctxClick object.
modeMode (Small mode or Large mode)

◆ dcmotor7_set_motor()

void dcmotor7_set_motor ( dcmotor7_t * ctx,
uint8_t motor,
uint8_t in1,
uint8_t in2 )

Functions for set Motor.

Parameters
ctxClick object.
motorMotor (A or B)
in1Motor Ach or Bch IN1 signal
in2Motor Ach or Bch IN2 signal

◆ dcmotor7_set_port()

void dcmotor7_set_port ( dcmotor7_t * ctx,
uint8_t port,
uint8_t value )

Functions for set port.

Parameters
ctxClick object.
portPort to be set up
valueValue to which the selected port is being set

◆ dcmotor7_set_pwm_motor_a()

void dcmotor7_set_pwm_motor_a ( dcmotor7_t * ctx,
uint8_t state )

Function for set PWM value for motor A.

Parameters
ctxClick object.
statePWM state

◆ dcmotor7_set_pwm_motor_b()

void dcmotor7_set_pwm_motor_b ( dcmotor7_t * ctx,
uint8_t state )

Function for set PWM value for motor B.

Parameters
ctxClick object.v
statePWM state

◆ dcmotor7_set_tblkab()

void dcmotor7_set_tblkab ( dcmotor7_t * ctx,
uint8_t tblk )

Functions for set Motor Ach and Bch Digital tBLK.

Parameters
ctxClick object.
tbblkTBLK noise rejection time (Digital tBLK = fOSCM � 4 clk or fOSCM � 6 clk)