CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rtos_msg_send problem..

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ClUeLess
Guest







rtos_msg_send problem..
PostPosted: Sun Jan 20, 2008 9:44 pm     Reply with quote

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();
}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group