Hi,
I have a question about how to design my classes in the following situation:
I have a communication port. It connects to an I2C bus. Through this port I
can communicate to a number of devices on the I2C bus. I am always the master
on the I2C bus. With each device I have a different protocol.
I think it will be ok to leave the port open all the time, and communicate
each time with a different device. It seems to me that it will be good to
have one class for the I2C communication, and then have a number of classes,
one for each device communicating with the I2C, that use the methods of the
I2C class.
However, I'm afraid of mixing I2C operations between several devices.
I may need to use some synchronization mechanism here, but I don't know
exactly what and how to do
..
Can someone please shed some light on the issue?
Thank you very much
|