indexcounter 2.0.0.0

Functions

void indexcounter_cfg_setup (indexcounter_cfg_t *cfg)
 Config Object Initialization function.
 
INDEXCOUNTER_RETVAL indexcounter_init (indexcounter_t *ctx, indexcounter_cfg_t *cfg)
 Initialization function.
 
void indexcounter_default_cfg (indexcounter_t *ctx)
 Click Default Configuration function.
 
uint8_t indexcounter_get_dir (indexcounter_t *ctx)
 Get state of the direction pin function.
 
uint8_t indexcounter_get_speed (indexcounter_t *ctx)
 Get state of the speed pin function.
 

Detailed Description

Function Documentation

◆ indexcounter_cfg_setup()

void indexcounter_cfg_setup ( indexcounter_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.

◆ indexcounter_default_cfg()

void indexcounter_default_cfg ( indexcounter_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Index Counter click.

◆ indexcounter_get_dir()

uint8_t indexcounter_get_dir ( indexcounter_t * ctx)

Get state of the direction pin function.

Returns
state of the direction:
  • 0 : inactive;
  • 1 : active state;

@description This function returns a state of the direction DIR ( AN ) pin.

◆ indexcounter_get_speed()

uint8_t indexcounter_get_speed ( indexcounter_t * ctx)

Get state of the speed pin function.

Returns
state of the speed:
  • 0 : inactive;
  • 1 : active state;

@description This function returns a state of the speed SPD ( RST ) pin.

◆ indexcounter_init()

INDEXCOUNTER_RETVAL indexcounter_init ( indexcounter_t * ctx,
indexcounter_cfg_t * cfg )

Initialization function.

Parameters
indexcounterClick object.
cfgClick configuration structure.

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