heliosproj / HeliOS

A community delivered, open source embedded operating system project.
http://www.heliosproj.org
GNU General Public License v2.0
352 stars 42 forks source link

Passing Parameters to task #24

Closed niektb closed 2 years ago

niektb commented 3 years ago

Hi! I had a question: is it possible to pass parameters to a task you're creating? So for example have two buttons but with a single task definition? void taskButton(xTaskId id_, const uint8_t port) which then is called with something like: int p = 1; id = xTaskAdd("TASKSW1", &taskSW, p)

MannyPeterson commented 2 years ago

@niektb not currently, but I am going to add this to the development backlog as I like the idea.

MannyPeterson commented 2 years ago

This feature will appear in 0.2.8

MannyPeterson commented 2 years ago

@niektb all done! Task parameters are now available in 0.3.0. Enjoy! :)

niektb commented 2 years ago

Sorry for getting back so late! Great news! I now worked around it using classes but this way is much more compact and elegant :D