Skip to content

Implement Arduino Scheduler wrapers #428

Description

@JacobChrist

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions