R.Wieser wrote:
> Rob Morley wrote:
>
>> To do that it would have to write into a buffer, then send it ...
>
> The question is, why do you have to ?
For many i2C devices you write a register address, followed by the value
to be written to that register, and possibly data to be written to
successive registers, these need to be atomic.
> I mean, I can write a line to the console in multiple parts by simply
> not sending an EOL. No kind of buffer involved ...
What happens if process A writes "hello" to the console one character at
a time, while process B writes "goodbye" to the console, also one
character at a time?
What if process A writes "1" followed by "2" to the I2C port and process
B writes "3" followed by "4" to the I2C port?
Do you get 2 written to register 1, and 4 written to register 3?
or 3 written to register 1 and 4 written to register 2?
or 1 written to register 3 and 2 written to register 4?
or ...
Your I2C controlled hardware is going to behave unexpectedly
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|