i2cextend2 2.0.0.0
|
API for configuring and manipulating I2C Extend 2 Click driver. More...
Topics | |
I2C Extend 2 Registers List | |
List of registers of I2C Extend 2 Click driver. | |
I2C Extend 2 Registers Settings | |
Settings for registers of I2C Extend 2 Click driver. | |
I2C Extend 2 MikroBUS Map | |
MikroBUS pin mapping of I2C Extend 2 Click driver. | |
Functions | |
void | i2cextend2_cfg_setup (i2cextend2_cfg_t *cfg) |
I2C Extend 2 configuration object setup function. | |
err_t | i2cextend2_init (i2cextend2_t *ctx, i2cextend2_cfg_t *cfg) |
I2C Extend 2 initialization function. | |
void | i2cextend2_rmt_write (i2cextend2_t *ctx, uint8_t reg, uint8_t tx_data) |
Generic write data in Remote Mode function. | |
uint8_t | i2cextend2_rmt_read (i2cextend2_t *ctx, uint8_t reg) |
Generic read data in Remote Mode function. | |
void | i2cextend2_rmt_multi_write (i2cextend2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes) |
Generic multi write data in Remote Mode function. | |
void | i2cextend2_rmt_multi_read (i2cextend2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes) |
Generic multi read data in Remote Mode function. | |
void | i2cextend2_enable (i2cextend2_t *ctx, uint8_t en_extend) |
Enable extend function. | |
API for configuring and manipulating I2C Extend 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 i2cextend2_cfg_setup | ( | i2cextend2_cfg_t * | cfg | ) |
I2C Extend 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See i2cextend2_cfg_t object definition for detailed explanation. |
void i2cextend2_enable | ( | i2cextend2_t * | ctx, |
uint8_t | en_extend ) |
Enable extend function.
The function enables extend by the set state of the CS ( logic '1' ) and disable by the clear state of the CS ( logic '0' ) of PCA9615 2-channel multipoint Fast-mode Plus differential I2C-bus buffer with hot-swap logic on the I2C Extend 2 click.
[in] | ctx | : Click context object. See #i2cextend_t object definition for detailed explanation. |
[in] | en_extend | : CS pin state. |
err_t i2cextend2_init | ( | i2cextend2_t * | ctx, |
i2cextend2_cfg_t * | cfg ) |
I2C Extend 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See i2cextend2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See i2cextend2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void i2cextend2_rmt_multi_read | ( | i2cextend2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_rx_data, | ||
uint8_t | n_bytes ) |
Generic multi read data in Remote Mode function.
Function read a sequential data starting from the targeted register address of the click board connected to the I2c Extend 2 click in Remote Mode.
[in] | ctx | : Click context object. See #i2cextend_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[out] | p_rx_data | : Pointer to the memory location where data be stored. |
[in] | n_bytes | : Number of bytes to be read. |
void i2cextend2_rmt_multi_write | ( | i2cextend2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_tx_data, | ||
uint8_t | n_bytes ) |
Generic multi write data in Remote Mode function.
Function writes a sequential data starting to the targeted register address of the click board connected to the I2c Extend 2 click in Remote Mode.
[in] | ctx | : Click context object. See #i2cextend_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[in] | p_tx_data | : Pointer to the data to be written. |
[in] | n_bytes | : Number of bytes to be written. |
uint8_t i2cextend2_rmt_read | ( | i2cextend2_t * | ctx, |
uint8_t | reg ) |
Generic read data in Remote Mode function.
Function read a the byte of data from the targeted 8-bit register address of the click board connected to the I2c Extend 2 click in Remote Mode.
[in] | ctx | : Click context object. See #i2cextend_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
void i2cextend2_rmt_write | ( | i2cextend2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | tx_data ) |
Generic write data in Remote Mode function.
Function writes a the byte of data to the targeted 8-bit register address of the click board connected to the I2c Extend 2 click in Remote Mode.
[in] | ctx | : Click context object. See #i2cextend_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[in] | tx_data | : Data to be written. |