Re: i2c_burst_write API
On 3 April 2017 at 12:35, Jon Medhurst (Tixy) <tixy@...> wrote:
On Mon, 2017-04-03 at 11:55 +0200, Erwan Gouriou wrote:
My view (but this could be an error from my part), is that defining a message
involves having a header byte (Slave Address | Write) being issued before payload.
*subaddress (or start address) in the first msg
*data in msg
Hence, when we define 2 messages, we get, if we set RESTART correctly
msg: S Addr Wr [A] subAddr [A] RS
msg: Addr Wr [A] Data [A] Data [A] ... [A] Data [A] P
Serialized, this gets:
S Addr Wr [A] subAddr [A] RS Addr Wr [A] Data [A] Data [A] ... [A] Data [A] P
While, as explained by Piotr, expected single message (for a burst write) is:
S Addr Wr [A] subAddr [A] Data [A] Data [A] ... [A] Data [A] P
My only issue/question is the message header of the second message thatdoes not seem to fit the expected sequence (detailed here for instance:
§5.1.1 in https://goo.gl/sfflM6). And even if we set the correct RESTART
flag, it is not expected by slave (unlike a burst read sequence)
Or there are other possible sequences that I am not aware of.
> and then expect the driver to generate a correct single message.
I agree driver should insert START/STOP/RESTART as defined by API and
specification or be fixed otherwise.