i2cisolator2
2.0.0.0
|
Functions | |
void | i2cisolator2_cfg_setup (i2cisolator2_cfg_t *cfg) |
Config Object Initialization function. More... | |
I2CISOLATOR2_RETVAL | i2cisolator2_init (i2cisolator2_t *ctx, i2cisolator2_cfg_t *cfg) |
Initialization function. More... | |
void | i2cisolator2_enable_power (i2cisolator2_t *ctx, uint8_t state) |
This function sets PDIS pin state. More... | |
void | i2cisolator2_generic_write (i2cisolator2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | i2cisolator2_generic_read (i2cisolator2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
void | i2cisolator2_write_two_byte_reg (i2cisolator2_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function for two-byte registers. More... | |
void | i2cisolator2_read_two_byte_reg (i2cisolator2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function for two-byte registers. More... | |
void | i2cisolator2_set_slave_address (i2cisolator2_t *ctx, uint8_t slave_addr) |
Set slave address function. More... | |
void i2cisolator2_cfg_setup | ( | i2cisolator2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void i2cisolator2_enable_power | ( | i2cisolator2_t * | ctx, |
uint8_t | state | ||
) |
This function sets PDIS pin state.
ctx | Click object. |
state | PDIS pin state. |
@description This function sets the state of PDIS pin.
void i2cisolator2_generic_read | ( | i2cisolator2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void i2cisolator2_generic_write | ( | i2cisolator2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
I2CISOLATOR2_RETVAL i2cisolator2_init | ( | i2cisolator2_t * | ctx, |
i2cisolator2_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void i2cisolator2_read_two_byte_reg | ( | i2cisolator2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic read function for two-byte registers.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired two-byte register.
void i2cisolator2_set_slave_address | ( | i2cisolator2_t * | ctx, |
uint8_t | slave_addr | ||
) |
Set slave address function.
ctx | Click object. |
slave_addr | Slave address. |
@description This function sets the slave address.
void i2cisolator2_write_two_byte_reg | ( | i2cisolator2_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic write function for two-byte registers.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired two-byte register.