In article ,
"R.Wieser" writes:
> Hello All,
>
> When I open /dev/i2c-1 and want to send some data to a certain port on the
> target device I currently always need to first combine the two into a single
> buffer, and than call 'write' providing it that buffer. Which feels a bit
> wastefull to me.
>
> My question therefore is:
> 1) Is there a way, for the above I2C "file", to do a multi-part write which
> gets accepted as a single one ?
You might try writev(2) - this is not an I2C function, but a standard
unix function to do a single write from multiple buffers which are
gathered into a single syscall, and passed as an array of pointers
and lengths. I haven't actually tried it with Linux I2C driver though.
> - and/or -
> 2) Is there a way to set the target port in another way - maybe in the same
> way the device address is currently set (using ioctl) ?
A target port is something related to your I2C device and not I2C itself,
and you didn't say what that was, so no one is going to be able to answer.
> My googeling did not turn up anything like it, which I why I'm asking here.
--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|