whats wrong in my program? it wont start the task/
program:
#include <rtl.h> #include<LPC214X.h>
void delay(void); __task void task1 (void); __task void task2 (void); OS_TID tsk1, tsk2;
__task void task1 (void) // Define the function as an RTX task { tsk1 =os_tsk_self(); // Read the Task-ID of the first task tsk2=os_tsk_create(task2,0); // Create the second task and assign its priority while(1) { IO0CLR=0x0000000F; delay(); IO0SET=0x0000000F; delay(); } }
__task void task2 (void) // Define the function as an RTX task {
while(1) { IO0CLR=0x00000F00; delay(); IO0SET=0x00000F00; delay(); } }
void delay (void) { unsigned int loop;
for(loop =0;loop<1000;loop++) { ; } } int main(void) { PINSEL0=0x00000000; IO0DIR=0XFFFFFFFF; os_sys_init_prio(task1,0); }