relay4 2.1.0.0
Relay 4 Click Driver

API for configuring and manipulating Relay 4 Click driver. More...

Topics

 Relay 4 MikroBUS Map
 MikroBUS pin mapping of Relay 4 Click driver.
 

Functions

void relay4_cfg_setup (relay4_cfg_t *cfg)
 Relay 4 configuration object setup function.
 
err_t relay4_init (relay4_t *ctx, relay4_cfg_t *cfg)
 Relay 4 initialization function.
 
void relay4_set_relay1_open (relay4_t *ctx)
 Relay 4 set relay1 open function.
 
void relay4_set_relay1_close (relay4_t *ctx)
 Relay 4 set relay1 close function.
 
void relay4_switch_relay1 (relay4_t *ctx)
 Relay 4 switch relay1 function.
 
void relay4_set_relay2_open (relay4_t *ctx)
 Relay 4 set relay2 open function.
 
void relay4_set_relay2_close (relay4_t *ctx)
 Relay 4 set relay2 close function.
 
void relay4_switch_relay2 (relay4_t *ctx)
 Relay 4 switch relay2 function.
 

Detailed Description

API for configuring and manipulating Relay 4 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ relay4_cfg_setup()

void relay4_cfg_setup ( relay4_cfg_t * cfg)

Relay 4 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See relay4_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ relay4_init()

err_t relay4_init ( relay4_t * ctx,
relay4_cfg_t * cfg )

Relay 4 initialization function.

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

Parameters
[out]ctx: Click context object. See relay4_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See relay4_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ relay4_set_relay1_close()

void relay4_set_relay1_close ( relay4_t * ctx)

Relay 4 set relay1 close function.

This function sets the relay 1 to normally close state by setting the RL1 pin to high logic level.

Parameters
[in]ctx: Click context object. See relay4_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ relay4_set_relay1_open()

void relay4_set_relay1_open ( relay4_t * ctx)

Relay 4 set relay1 open function.

This function sets the relay 1 to normally open state by setting the RL1 pin to low logic level.

Parameters
[in]ctx: Click context object. See relay4_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ relay4_set_relay2_close()

void relay4_set_relay2_close ( relay4_t * ctx)

Relay 4 set relay2 close function.

This function sets the relay 2 to normally close state by setting the RL2 pin to high logic level.

Parameters
[in]ctx: Click context object. See relay4_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ relay4_set_relay2_open()

void relay4_set_relay2_open ( relay4_t * ctx)

Relay 4 set relay2 open function.

This function sets the relay 2 to normally open state by setting the RL2 pin to low logic level.

Parameters
[in]ctx: Click context object. See relay4_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ relay4_switch_relay1()

void relay4_switch_relay1 ( relay4_t * ctx)

Relay 4 switch relay1 function.

This function switches the relay 1 state by toggling the RL1 pin logic level.

Parameters
[in]ctx: Click context object. See relay4_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ relay4_switch_relay2()

void relay4_switch_relay2 ( relay4_t * ctx)

Relay 4 switch relay2 function.

This function switches the relay 2 state by toggling the RL2 pin logic level.

Parameters
[in]ctx: Click context object. See relay4_t object definition for detailed explanation.
Returns
None.
Note
None.