dcmotor11 2.0.0.0

Functions

void dcmotor11_cfg_setup (dcmotor11_cfg_t *cfg)
 Config Object Initialization function.
 
DCMOTOR11_RETVAL dcmotor11_init (dcmotor11_t *ctx, dcmotor11_cfg_t *cfg)
 Initialization function.
 
void dcmotor11_generic_write (dcmotor11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void dcmotor11_generic_read (dcmotor11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void dcmotor11_control (dcmotor11_t *ctx, uint8_t dir, uint8_t speed)
 Motor Control.
 
uint8_t dcmotor11_get_fault (dcmotor11_t *ctx)
 Get Fault.
 
void dcmotor11_clear_fault (dcmotor11_t *ctx, uint8_t dev_data)
 Set Fault.
 
void dcmotor11_stop (dcmotor11_t *ctx)
 Motor Stop.
 
void dcmotor11_break (dcmotor11_t *ctx)
 Motor Break.
 
uint8_t dcmotor11_get_interrupt_state (dcmotor11_t *ctx)
 Interrupt state on the INT pin.
 

Detailed Description

Function Documentation

◆ dcmotor11_break()

void dcmotor11_break ( dcmotor11_t * ctx)

Motor Break.

Parameters
ctxClick object.

◆ dcmotor11_cfg_setup()

void dcmotor11_cfg_setup ( dcmotor11_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.

◆ dcmotor11_clear_fault()

void dcmotor11_clear_fault ( dcmotor11_t * ctx,
uint8_t dev_data )

Set Fault.

Parameters
ctxClick object.
dev_dataData for write to the Fault register

◆ dcmotor11_control()

void dcmotor11_control ( dcmotor11_t * ctx,
uint8_t dir,
uint8_t speed )

Motor Control.

Parameters
ctxClick object.
dirSets Directions - FORWARD/BACKWARD
speedSets output voltage (Speed)

◆ dcmotor11_generic_read()

void dcmotor11_generic_read ( dcmotor11_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.

◆ dcmotor11_generic_write()

void dcmotor11_generic_write ( dcmotor11_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ dcmotor11_get_fault()

uint8_t dcmotor11_get_fault ( dcmotor11_t * ctx)

Get Fault.

Parameters
ctxClick object.
Returns
Fault registar state

◆ dcmotor11_get_interrupt_state()

uint8_t dcmotor11_get_interrupt_state ( dcmotor11_t * ctx)

Interrupt state on the INT pin.

Parameters
ctxClick object.
Returns
Interrupt state

◆ dcmotor11_init()

DCMOTOR11_RETVAL dcmotor11_init ( dcmotor11_t * ctx,
dcmotor11_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ dcmotor11_stop()

void dcmotor11_stop ( dcmotor11_t * ctx)

Motor Stop.

Parameters
ctxClick object.