I have a UserInterface task which gets ‘button press’ events from a ButtonsTask via a queue, and also polls 4 pins every 30 ms to get values from an external 8 channel ADC IC.
I use TaskDelay(). I also have 3 other tasks ( TaskA,B and C ) which need to take action based on buttons presses and adc. How do I notify the tasksA,B,C and pass UserInterface data to them? Should I create 3 queues and send the data to all 3 task queues and have each of the 3 Tasks unblock on the their queues? I would be duplicating the UserInterface data 3 times, once for each queue and want to ensure this is a valid approach.
I was thinking of also maybe using 3 queues setup as mailboxes for TaskA,B and C so the UserInterfaceTask would update the 3 mailboxes and TaskA,B and C would peek at the mailboxes any time they need them.