I want to go with a state machine pattern. Is using freeRTOS Queues to send event messages between tasks?
For example, if I have 3 freeRTOS tasks running, each watching a common stateQueue. Tasks take action when they get a new stateQueue item, and potentially trigger state transitions by adding to the stateQueue, but a tasks only takes action if the stateQueue item is 'addressed' to it. Tasks ignore stateQueue items not addressed to them. Once a tasks takes action, it removes the item from the stateQueue. Is there a better way to implement this pattern?
