Hello,
I am new in RTOS, so the best is to ask first than code second. I have two I2C devices, call them A and B and being used in their tasks, Task_A and Task_B.
What I have:
When I call i2c_open() function in Task A to initialize the comm. for device A, I got an error when I trying to call the i2c_open() for device B in Task B. I suppose, when I initialized the peripheral I don't need to do it again.
Problems/Questions:
- Should I share the result of i2c_open for both tasks and then create two independent i2cParams and Transaction of both tasks?
- Or should I create a third task called: i2C_Comm and use mailboxes to send and receive data. Messagebox element should contain the i2c address and the data/reply.
I have attached a simple drawing for better understanding ;)
Thank you for your suggestions and reply
 
				 
		 
					 
                          
 
				 
				