Best way to run losly coupled code in a task context

freertosguru wrote on Monday, July 30, 2018:

Hi FreeRTOS community. I have been working with FreeRTOS for some years now and are wondering what best practices there is for running code under a specifik task context. I have previously made a solution whit a custom build event system where i in other loosly coupled modules, fx a lower lever HW driver can be execuring code on another task. By creating a function in the task that will move the required data from fx intterupt context to task context by. There by letting me subscribe to events from lower level peripherals typically from ISR context and rest asured that when the event is fired and my handler is executing i am no longler in ISR context.

TLDR how have you guys called functions within other modules in an loosky coupled fashion from a task context without having the module know anything about FreeRTOS.