avr icon indicating copy to clipboard operation
avr copied to clipboard

Add address shift

Open samikool opened this issue 1 year ago • 0 comments

Hello,

I was working with the I2C portion of your library with QEmu and found something I wanted to make you aware of.

I believe the address passed to the i2c_start routine should be shifted by one bit to the left. Since I2C addresses are the upper 7 bits of a byte, the 0th bit being a R/W, most I2C libraries will shift the address passed to the routine like this for the user, so the value passed in correctly shows up in the upper 7 bits of the byte that is sent.

Hope that makes sense, let me know if you have any questions.

Sam

samikool avatar Jul 12 '23 22:07 samikool