bitbank2 / BitBang_I2C

A software I2C implementation to run on any GPIO pins on any system
GNU General Public License v3.0
235 stars 31 forks source link

Write to specific register #4

Closed sergiorus77 closed 4 years ago

sergiorus77 commented 4 years ago

How can I write data into specific register using function I2Cwrite ? Looking something similar to function I2CReadRegister

bitbank2 commented 4 years ago

Depending on your device, the first byte of the data stream is normally interpreted as the register. For example, if you want to write the value 0x55 to register 0x01, you would just write the 2 bytes: 0x01 0x55.