|There are plenty of resources about ioctl.
All of them refer to "files" which is OK.
What is missing - as far as I am concerned - is actual code where commands and data passed via ioctl function are processed.
It is very common to read " use plain write " to do the hardware manipulation.
Since "what are you trying to do" is often first reply - here is a sample.
Purpose of the code is to output data to I2C hardware:
iResult = write(FileDescriptor,Data,iSize);
Works as expected.
When I get more familiar with ioctl I'll try use I2C ioctl "write macro" instead of "plain" write.
My primary question is - how to find the actual Linux code which "transfers" the write function to sending I2C clock and data. (Mrs Google - via Github - keeps giving me the "files" and not reference to actual Linux source code - perhaps I am asking wrong way - again. )
My secondary is - how to verify that my code actually reads I2C ACK when I send the I2C address.
All I am getting is "number of characters processed", which is fine, but does it "include " verifying the ACK?