relay4 2.1.0.0
|
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. | |
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.
void relay4_cfg_setup | ( | relay4_cfg_t * | cfg | ) |
Relay 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See relay4_cfg_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See relay4_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See relay4_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See relay4_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See relay4_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See relay4_t object definition for detailed explanation. |