balancer4 2.0.0.0
|
API for configuring and manipulating Balancer 4 Click driver. More...
Topics | |
Balancer 4 Registers List | |
List of registers of Balancer 4 Click driver. | |
Balancer 4 Registers Settings | |
Settings for registers of Balancer 4 Click driver. | |
Balancer 4 MikroBUS Map | |
MikroBUS pin mapping of Balancer 4 Click driver. | |
Functions | |
void | balancer4_cfg_setup (balancer4_cfg_t *cfg) |
Balancer 4 configuration object setup function. | |
err_t | balancer4_init (balancer4_t *ctx, balancer4_cfg_t *cfg) |
Balancer 4 initialization function. | |
err_t | balancer4_default_cfg (balancer4_t *ctx) |
Balancer 4 default configuration function. | |
err_t | balancer4_write_register (balancer4_t *ctx, uint8_t reg, uint8_t data_in) |
Balancer 4 write register function. | |
err_t | balancer4_write_and_verify_register (balancer4_t *ctx, uint8_t reg, uint8_t data_in) |
Balancer 4 write and verify register function. | |
err_t | balancer4_read_register (balancer4_t *ctx, uint8_t reg, uint8_t *data_out) |
Balancer 4 read register function. | |
API for configuring and manipulating Balancer 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 balancer4_cfg_setup | ( | balancer4_cfg_t * | cfg | ) |
Balancer 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See balancer4_cfg_t object definition for detailed explanation. |
err_t balancer4_default_cfg | ( | balancer4_t * | ctx | ) |
Balancer 4 default configuration function.
This function executes a default configuration of Balancer 4 click board.
[in] | ctx | : Click context object. See balancer4_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t balancer4_init | ( | balancer4_t * | ctx, |
balancer4_cfg_t * | cfg ) |
Balancer 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See balancer4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See balancer4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t balancer4_read_register | ( | balancer4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Balancer 4 read register function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See balancer4_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. err_t balancer4_write_and_verify_register | ( | balancer4_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Balancer 4 write and verify register function.
This function writes a desired data byte to the selected register and verifies if is is written correctly by reading it.
[in] | ctx | : Click context object. See balancer4_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. err_t balancer4_write_register | ( | balancer4_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Balancer 4 write register function.
This function writes a desired data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See balancer4_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.