opto3 2.0.0.0
Public function

Functions

void opto3_cfg_setup (opto3_cfg_t *cfg)
 Config Object Initialization function.
 
err_t opto3_init (opto3_t *ctx, opto3_cfg_t *cfg)
 Initialization function.
 
uint8_t opto3_get_in1 (opto3_t *ctx)
 Get input 1.
 
uint8_t opto3_get_in2 (opto3_t *ctx)
 Get input 2.
 
void opto3_set_out1 (opto3_t *ctx, uint8_t state)
 Set output 1.
 
void opto3_set_out2 (opto3_t *ctx, uint8_t state)
 Set output 2.
 

Detailed Description

Function Documentation

◆ opto3_cfg_setup()

void opto3_cfg_setup ( opto3_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ opto3_get_in1()

uint8_t opto3_get_in1 ( opto3_t * ctx)

Get input 1.

Parameters
ctxClick object.

This function gets input 1 pin state.

◆ opto3_get_in2()

uint8_t opto3_get_in2 ( opto3_t * ctx)

Get input 2.

Parameters
ctxClick object.

This function gets input 2 pin state.

◆ opto3_init()

err_t opto3_init ( opto3_t * ctx,
opto3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ opto3_set_out1()

void opto3_set_out1 ( opto3_t * ctx,
uint8_t state )

Set output 1.

Parameters
ctxClick object.
statePin state

This function sets output 1 pin state.

◆ opto3_set_out2()

void opto3_set_out2 ( opto3_t * ctx,
uint8_t state )

Set output 2.

Parameters
ctxClick object.
statePin state

This function sets output 2 pin state.