comparator  2.0.0.0
Functions

Functions

void comparator_cfg_setup (comparator_cfg_t *cfg)
 Config Object Initialization function. More...
 
COMPARATOR_RETVAL comparator_init (comparator_t *ctx, comparator_cfg_t *cfg)
 Initialization function. More...
 
uint8_t comparator_check_output_one (comparator_t *ctx)
 Check state of the o1 pin function. More...
 
uint8_t comparator_check_output_two (comparator_t *ctx)
 Check state of the o2 pin function. More...
 

Detailed Description

Function Documentation

◆ comparator_cfg_setup()

void comparator_cfg_setup ( comparator_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.

◆ comparator_check_output_one()

uint8_t comparator_check_output_one ( comparator_t ctx)

Check state of the o1 pin function.

Parameters
ctxClick object.
Returns
State of o1 pin:
  • 0 : Low;
  • 1 : High;

@description This function check and return state of the o1 ( AN ) pin of Comparator Click Board.

◆ comparator_check_output_two()

uint8_t comparator_check_output_two ( comparator_t ctx)

Check state of the o2 pin function.

Parameters
ctxClick object.
Returns
State of o1 pin:
  • 0 : Low;
  • 1 : High;

@description This function check and return state of the o2 ( INT ) pin of Comparator Click Board.

◆ comparator_init()

COMPARATOR_RETVAL comparator_init ( comparator_t ctx,
comparator_cfg_t cfg 
)

Initialization function.

Parameters
comparatorClick object.
cfgClick configuration structure.

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