linguini1 commented on PR #17012:
URL: https://github.com/apache/nuttx/pull/17012#issuecomment-3288576210

   > Some I2C peripherals don't allow direct control over the start/stop bit. 
In these cases, you have to manually merge the messages in your I2C driver. You 
can take a look at Nordic I2C drivers how it's done:
   
   Hmmm, copying the messages to one continuous buffer seems inefficient. I 
guess if I were to merge messages I would just sum up the lengths of all the 
messages that are meant to be continuous and then write them piece-wise to the 
I2C FIFO.
   
   > EDIT: if there are more drivers that require I2C message merging feature, 
we can probably move this logic to common OS code to make it easy to reuse.
   
   That would probably be an even better solution actually, although I'm not 
sure how it would best be implemented. It could be completely different 
depending on how the lower-half is implemented (i.e. NRF copying to a large 
buffer, bit-banging for some chips or maybe fusing with FIFO writes).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to