ClUeLess Guest
|
rtos_msg_send problem.. |
Posted: Sun Jan 20, 2008 9:44 pm |
|
|
can anybody tell me whats wrong with my code.. It has an error ("EXPECTING FUNCTION NAME") near "rtos_msg_send(the_second_rtos_task,count);" please help..
Code: |
#include<16f877.h>
#use delay(clock=20000000)
#use rs232 (baud=9600,xmit=PIN_C6,rcv=PIN_C7)
#use rtos(timer=0,minor_cycle=100ms)
#task(rate=1000ms,max=100ms,queue=2)
void the_first_rtos_task();
#task(rate=500ms,max=100ms,queue=2)
void the_second_rtos_task();
void the_first_rtos_task()
{
int count=0;
while(true){
count++;
rtos_msg_send(the_second_rtos_task,count);
rtos_yield();
}
}
void the_second_rtos_task()
{
if (rtos_msg_poll())
{
printf("count is : %i\n\r",rtos_msg_read());
}
}
void main()
{
rtos_run();
}
|
|
|