[ECOS] alarm not triggering
Mahesh
mahesh@cranessoftware.com
Tue Sep 30 10:42:00 GMT 2003
Hi,
The code given below is getting stuck in the while loop.
Plz give solution for it.
Code is
system_clock=cyg_real_time_clock();
cyg_clock_to_counter(system_clock,&handle_counterTdly);
cyg_alarm_create(handle_counterTdly, alarm_Tpdly_func,0,
&handle_alarmTdly, &alarm_Tdly);
cyg_alarm_initialize(handle_alarmTdly,cyg_current_time()+Tdly,0);
delay_flag=0;
// reception of Tdly
while(1)
{
if (delay_flag==1)
{
cyg_mutex_lock(&cliblock);
printf("\n delay received \n");
cyg_mutex_unlock(&cliblock);
sstate=new;
break;
}
}
//alarm timer function
void alarm_Tdly_func(cyg_handle_t alarmH, cyg_addrword_t data)
{
delay_flag=1;
}
_______________________________________________
This email with any attachments is for the exclusive use of the intended
recipient/s & may contain confidential & legally privileged information.
If you are not the intended recipient pls notify the sender immediately
& delete the email from your system. Any unauthorised use, disclosure,
printing, dissemination, forwarding or copying of this mail is strictly
prohibited and unlawful.
Visit us at : http://www.cranessoftware.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list