title: How do I keep code portable while using FreeRTOS
body: <p>I am hung up on how to move forward with FreeRTOS in my application. Let me propose a simple scenario. Assume I have main and a module which has some hardware specific code. This code could be for controlling a specific motor in a system or a sensor... any bit of hardware with a defined role. Within module.c I have a function called <code>ModuleNameTask</code>. In <code>main</code> I create the task using <code>xTaskCreate</code> and I pass <code>ModuleNameTask</code>. Since my <code>ModuleNameTask</code> is defined in module.c and not main.c, I now have to include bits of FreeRTOS within module.c in order to use functions like <code>vTaskDelay</code>. I don't like the fact that I am including these files within module.c as I feel its no longer portable.</p>
  
  <p>So, how do I handle this? Should I remove that <code>ModuleNameTask</code> from module.c and place it in main.c? Or just accept the fact that I have to include bits of FreeRTOS into module.c. Any advice?</p>