When I compile the following sketch on my 2560 Mega board it gives error: too many arguments to function void OSInit()
my sketch is as follows
please help me in this regard:
#include <ardio.h>
#include <ArdOS.h>
#include <ArdOSConfig.h>
#include <kernel.h>
#include <mutex.h>
#include <queue.h>
#include <sema.h>
#include <task.h>
#define NUM_TASKS 2 // we must know in advance how many
/* simple sleep forever task /
void task1(void p){
while (1){
OSSleep(500);
}
}
/* simple sleep forever task /
void task2(void p){
while(1){
OSSleep(50);
}
}
/* regular Arduino setup */
void setup()
{
OSInit(NUM_TASKS);
// Create the tasks
OSCreateTask(0, &task1, NULL);
OSCreateTask(1, &task2, NULL);
// Start the scheduler
OSRun();
}