#include "config.h"
#include "stdlib.h"
#define
#define
#define TaskStkLengh 64
OS_STK TaskStartStk[TaskStkLengh];
OS_STK TaskLED1Stk[TaskStkLengh];
OS_STK TaskLED2Stk[TaskStkLengh];
void TaskStart(void *pdata);
void TaskLED1(void *pdata);
void TaskLED2(void *pdata);
int main (void)
{
OSInit ();
OSTaskCreate (TaskStart,(void *)0, &TaskStartStk[TaskStkLengh - 1], 0);
OSStart ();
return 0;
}
void TaskStart(void *pdata)
{
pdata = pdata;
TargetInit ();
OSTaskCreate(TaskLED1,(void *)0, &TaskLED1Stk[TaskStkLengh - 1], 1);
OSTaskCreate(TaskLED2,(void *)0, &TaskLED2Stk[TaskStkLengh - 1], 2);
while(1)
{
}
}
void TaskLED1(void *pdata)
{
pdata = pdata;
PINSEL2 = PINSEL2 & (~0x08);
IO1DIR |= LED1;
while(1)
{
}
}
void TaskLED2(void *pdata)
{
pdata = pdata;
PINSEL2 = PINSEL2 & (~0x08);
IO1DIR |= LED2;
while(1)
{
}
}