i2cisolator2 2.0.0.0
|
Functions | |
void | i2cisolator2_cfg_setup (i2cisolator2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | i2cisolator2_init (i2cisolator2_t *ctx, i2cisolator2_cfg_t *cfg) |
Initialization function. | |
void | i2cisolator2_enable_power (i2cisolator2_t *ctx, uint8_t state) |
This function sets PDIS pin state. | |
err_t | i2cisolator2_write (i2cisolator2_t *ctx, uint8_t *data_in, uint16_t len) |
Generic write function. | |
err_t | i2cisolator2_read (i2cisolator2_t *ctx, uint8_t *data_out, uint16_t len) |
Generic read function. | |
err_t | i2cisolator2_write_then_read (i2cisolator2_t *ctx, uint8_t *data_in, uint16_t in_len, uint8_t *data_out, uint16_t out_len) |
Generic write then read function. | |
err_t | i2cisolator2_set_slave_address (i2cisolator2_t *ctx, uint8_t slave_addr) |
Set slave address function. | |
void i2cisolator2_cfg_setup | ( | i2cisolator2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
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. |
This function sets the state of PDIS pin.
err_t i2cisolator2_init | ( | i2cisolator2_t * | ctx, |
i2cisolator2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t i2cisolator2_read | ( | i2cisolator2_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
Generic read function.
ctx | Click object. |
data_out | Output data buf |
len | Number of bytes to be read |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t i2cisolator2_set_slave_address | ( | i2cisolator2_t * | ctx, |
uint8_t | slave_addr ) |
Set slave address function.
ctx | Click object. |
slave_addr | Slave address. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t i2cisolator2_write | ( | i2cisolator2_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
Generic write function.
ctx | Click object. |
data_in | Data buf to be written. |
len | Number of bytes in data buf. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t i2cisolator2_write_then_read | ( | i2cisolator2_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | in_len, | ||
uint8_t * | data_out, | ||
uint16_t | out_len ) |
Generic write then read function.
ctx | Click object. |
data_in | Data buf to be written. |
in_len | Number of bytes in data in buffer. |
data_out | Output data buf |
out_len | Number of bytes in data out buffer. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.