relay 2.0.0.0
Public function

Functions

void relay_cfg_setup (relay_cfg_t *cfg)
 Config Object Initialization function.
 
RELAY_RETVAL relay_init (relay_t *ctx, relay_cfg_t *cfg)
 Initialization function.
 
void relay_default_cfg (relay_t *ctx)
 Click Default Configuration function.
 
void relay_set_state (relay_t *ctx, uint8_t relay, uint8_t state)
 Relay set state.
 

Detailed Description

Function Documentation

◆ relay_cfg_setup()

void relay_cfg_setup ( relay_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.

◆ relay_default_cfg()

void relay_default_cfg ( relay_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Relay click.

Note
Both relays are set to OFF state..

◆ relay_init()

RELAY_RETVAL relay_init ( relay_t * ctx,
relay_cfg_t * cfg )

Initialization function.

Parameters
relayClick object.
cfgClick configuration structure.

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

◆ relay_set_state()

void relay_set_state ( relay_t * ctx,
uint8_t relay,
uint8_t state )

Relay set state.

Parameters
ctxClick object.
relayNumber of relay (RELAY_NUM_1 or RELAY_NUM_2).
stateRelay state (RELAY_STATE_ON or RELAY_STATE_OFF).

@description With this function you can control relays.