# libdigiapix i2c write

**URL:** <https://forums.digi.com/t/libdigiapix-i2c-write/22528>\
**Category:** Linux\
**Tags:** i2c, write, libdigiapix\
**Created:** [July 7, 2021, 5:28am UTC](https://forums.digi.com/t/libdigiapix-i2c-write/22528 "2021-07-07T05:28:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstanton](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@cstanton](https://forums.digi.com/u/cstanton)\
**Post date:** [July 7, 2021, 5:28am UTC](https://forums.digi.com/t/libdigiapix-i2c-write/22528/1 "2021-07-07T05:28:49Z")

</div>

Hi Im trying to use the libdigiapix I2C API to write to a register in a slave device.

Looking at the documentation here: [https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.0/cc6ul/yocto\_r\_apix-i2c.html](https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.0/cc6ul/yocto_r_apix-i2c.html) I can see that there is an i2c\_write function and an i2c\_transfer function.

The write function lets you specify the slave address but not a register address on the slave device youre writing to, while the transfer function lets you specify a register value on the slave to read from/write to, but I cant see how you can pass a value to write to said register with this function.

For example, I have a slave device at address 0x68, with an 8 bit register at address 0x14 that I need to write an 8 bit value to to set/clear certain bits. Is it possible to even do this with either of these library functions?
