Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Arduino Scheduler wrapers #428

Open
JacobChrist opened this issue Jun 9, 2018 · 0 comments
Open

Implement Arduino Scheduler wrapers #428

JacobChrist opened this issue Jun 9, 2018 · 0 comments

Comments

@JacobChrist
Copy link
Member

JacobChrist commented Jun 9, 2018

Arduino has a scheduler that is simplistic (yet easy to learn and easy to teach) task scheduler that could be easily be implemented as a wrapper around the chipKIT-core task manager. The two functions:

startLoop()
yield()

Suggested wrappers:
uint32_t dummy_task_var;
startLoop(taskFunc task) { createTask(task, 0, TASK_ENABLE, &dummy_task_var); }
yield() { delay(0); }

What I'm unsure of is that the chipKIT tasks pass parameters to the task callback. The Arduino tasks to not take parameters. This may require making a new taskFuncArduino type to support this parameter-less callback.

typedef void (*taskFuncArduino)();

If this is done then the task manager would need to detect the pointer type.

https://www.arduino.cc/en/Reference/Scheduler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant