i2c1wire2
2.1.0.0
|
API for configuring and manipulating I2C 1-Wire 2 Click driver. More...
Modules | |
I2C 1-Wire 2 Registers List | |
List of registers of I2C 1-Wire 2 Click driver. | |
I2C 1-Wire 2 Registers Settings | |
Settings for registers of I2C 1-Wire 2 Click driver. | |
I2C 1-Wire 2 MikroBUS Map | |
MikroBUS pin mapping of I2C 1-Wire 2 Click driver. | |
Functions | |
void | i2c1wire2_cfg_setup (i2c1wire2_cfg_t *cfg) |
I2C 1-Wire 2 configuration object setup function. More... | |
err_t | i2c1wire2_init (i2c1wire2_t *ctx, i2c1wire2_cfg_t *cfg) |
I2C 1-Wire 2 initialization function. More... | |
err_t | i2c1wire2_default_cfg (i2c1wire2_t *ctx) |
I2C 1-Wire 2 default configuration function. More... | |
err_t | i2c1wire2_generic_write (i2c1wire2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
I2C 1-Wire 2 I2C writing function. More... | |
err_t | i2c1wire2_generic_read (i2c1wire2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
I2C 1-Wire 2 I2C reading function. More... | |
err_t | i2c1wire2_master_reset (i2c1wire2_t *ctx) |
I2C 1-Wire 2 master reset function. More... | |
err_t | i2c1wire2_read_port_cfg (i2c1wire2_t *ctx, uint8_t reg, uint8_t *data_out) |
I2C 1-Wire 2 read port configuration function. More... | |
err_t | i2c1wire2_write_port_cfg (i2c1wire2_t *ctx, uint8_t reg, uint8_t *data_in) |
I2C 1-Wire 2 write port configuration function. More... | |
err_t | i2c1wire2_search (i2c1wire2_t *ctx, uint8_t *flag, uint8_t *rom_id, uint8_t *last_flag, uint8_t param_data, uint8_t command_code) |
I2C 1-Wire 2 search function. More... | |
API for configuring and manipulating I2C 1-Wire 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void i2c1wire2_cfg_setup | ( | i2c1wire2_cfg_t * | cfg | ) |
I2C 1-Wire 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See i2c1wire2_cfg_t object definition for detailed explanation. |
err_t i2c1wire2_default_cfg | ( | i2c1wire2_t * | ctx | ) |
I2C 1-Wire 2 default configuration function.
This function executes a default configuration of I2C 1-Wire 2 click board.
[in] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2c1wire2_generic_read | ( | i2c1wire2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
I2C 1-Wire 2 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2c1wire2_generic_write | ( | i2c1wire2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
I2C 1-Wire 2 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2c1wire2_init | ( | i2c1wire2_t * | ctx, |
i2c1wire2_cfg_t * | cfg | ||
) |
I2C 1-Wire 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See i2c1wire2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2c1wire2_master_reset | ( | i2c1wire2_t * | ctx | ) |
I2C 1-Wire 2 master reset function.
This function is used to reset device, and return all configuration registers to the default values.
[in] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2c1wire2_read_port_cfg | ( | i2c1wire2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
I2C 1-Wire 2 read port configuration function.
This function is used to read one or all configuration registers.
[in] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
[in] | reg | : Selected register. |
[out] | data_out | : Register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2c1wire2_search | ( | i2c1wire2_t * | ctx, |
uint8_t * | flag, | ||
uint8_t * | rom_id, | ||
uint8_t * | last_flag, | ||
uint8_t | param_data, | ||
uint8_t | command_code | ||
) |
I2C 1-Wire 2 search function.
This function is used to perform 1-Wire Search algorithm and return one device ROMID.
[in] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
[out] | flag | : Search algorithm result. |
[out] | rom_id | : Read ROMID. |
[out] | last_flag | : Last device flag. |
[in] | param_data | : Search algorithm parameters. |
[in] | command_code | : Search Command code for device. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2c1wire2_write_port_cfg | ( | i2c1wire2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in | ||
) |
I2C 1-Wire 2 write port configuration function.
This function is used to write a 1-Wire configuration register.
[in] | ctx | : Click context object. See i2c1wire2_t object definition for detailed explanation. |
[in] | reg | : Selected register. |
[in] | data_in | : Register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.