relay5 2.1.0.0
|
API for configuring and manipulating Relay 5 Click driver. More...
Topics | |
Relay 5 Registers List | |
List of registers of Relay 5 Click driver. | |
Relay 5 Registers Settings | |
Settings for registers of Relay 5 Click driver. | |
Relay 5 MikroBUS Map | |
MikroBUS pin mapping of Relay 5 Click driver. | |
Functions | |
void | relay5_cfg_setup (relay5_cfg_t *cfg) |
Relay 5 configuration object setup function. | |
err_t | relay5_init (relay5_t *ctx, relay5_cfg_t *cfg) |
Relay 5 initialization function. | |
err_t | relay5_default_cfg (relay5_t *ctx) |
Relay 5 default configuration function. | |
err_t | relay5_write_register (relay5_t *ctx, uint8_t reg, uint8_t data_in) |
Relay 5 write register function. | |
err_t | relay5_read_register (relay5_t *ctx, uint8_t reg, uint8_t *data_out) |
Relay 5 read register function. | |
err_t | relay5_set_relay1_open (relay5_t *ctx) |
Relay 5 set relay 1 open function. | |
err_t | relay5_set_relay1_close (relay5_t *ctx) |
Relay 5 set relay 1 close function. | |
err_t | relay5_switch_relay1 (relay5_t *ctx) |
Relay 5 switch relay 1 function. | |
err_t | relay5_set_relay2_open (relay5_t *ctx) |
Relay 5 set relay 2 open function. | |
err_t | relay5_set_relay2_close (relay5_t *ctx) |
Relay 5 set relay 2 close function. | |
err_t | relay5_switch_relay2 (relay5_t *ctx) |
Relay 5 switch relay 2 function. | |
err_t | relay5_set_relay3_open (relay5_t *ctx) |
Relay 5 set relay 3 open function. | |
err_t | relay5_set_relay3_close (relay5_t *ctx) |
Relay 5 set relay 3 close function. | |
err_t | relay5_switch_relay3 (relay5_t *ctx) |
Relay 5 switch relay 3 function. | |
void | relay5_set_rst_pin (relay5_t *ctx, uint8_t state) |
Relay 5 set rst pin function. | |
void | relay5_reset_device (relay5_t *ctx) |
Relay 5 reset device function. | |
API for configuring and manipulating Relay 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void relay5_cfg_setup | ( | relay5_cfg_t * | cfg | ) |
Relay 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See relay5_cfg_t object definition for detailed explanation. |
err_t relay5_default_cfg | ( | relay5_t * | ctx | ) |
Relay 5 default configuration function.
This function executes a default configuration of Relay 5 click board.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_init | ( | relay5_t * | ctx, |
relay5_cfg_t * | cfg ) |
Relay 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See relay5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_read_register | ( | relay5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Relay 5 read register function.
This function reads data from the selected PCA9538A register by using I2C serial interface.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void relay5_reset_device | ( | relay5_t * | ctx | ) |
Relay 5 reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
err_t relay5_set_relay1_close | ( | relay5_t * | ctx | ) |
Relay 5 set relay 1 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 relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_set_relay1_open | ( | relay5_t * | ctx | ) |
Relay 5 set relay 1 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 relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_set_relay2_close | ( | relay5_t * | ctx | ) |
Relay 5 set relay 2 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 relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_set_relay2_open | ( | relay5_t * | ctx | ) |
Relay 5 set relay 2 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 relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_set_relay3_close | ( | relay5_t * | ctx | ) |
Relay 5 set relay 3 close function.
This function sets the relay 3 to normally close state by setting the RL3 pin to high logic level.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_set_relay3_open | ( | relay5_t * | ctx | ) |
Relay 5 set relay 3 open function.
This function sets the relay 3 to normally open state by setting the RL3 pin to low logic level.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void relay5_set_rst_pin | ( | relay5_t * | ctx, |
uint8_t | state ) |
Relay 5 set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
[in] | state | :
|
err_t relay5_switch_relay1 | ( | relay5_t * | ctx | ) |
Relay 5 switch relay 1 function.
This function switches the relay 1 state by toggling the RL1 pin logic level.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_switch_relay2 | ( | relay5_t * | ctx | ) |
Relay 5 switch relay 2 function.
This function switches the relay 2 state by toggling the RL2 pin logic level.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_switch_relay3 | ( | relay5_t * | ctx | ) |
Relay 5 switch relay 3 function.
This function switches the relay 3 state by toggling the RL3 pin logic level.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t relay5_write_register | ( | relay5_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Relay 5 write register function.
This function writes a desired data byte to the selected PCA9538A register by using I2C serial interface.
[in] | ctx | : Click context object. See relay5_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.