[Tinyos-help] Reg: TOSH_INTERRUPT in T2

Dheeraj dhee_raj2934 at yahoo.com
Tue Dec 9 11:41:01 PST 2008




Hi,

I was trying to convert the following code from T1 to T2


 TOSH_INTERRUPT(SIG_OUTPUT_COMPARE3A) {

    if (needupdate){
      if (sign == NEGATIVE){
TCNT3 = MAX_VAL - Update.sticks;
MTicks = MTicks - Update.mticks; /* We do not need to subtract 1 as 1 is being added already and we have omitted it */
      }
      else if (sign == POSITIVE){
TCNT3 = Update.sticks;
MTicks = MTicks + Update.mticks + 1;
signal SClock.fire(MTicks);
      }
      needupdate = 0;
      signal SClock.syncDone();
    }
    else{
      MTicks++;
      signal SClock.fire(MTicks);
    }
  }
It gives following error.....


In component `HPLSClock':
../../tos/platform/mica2/HPLSClock.nc:134: old-style parameter lists not supported
../../tos/platform/mica2/HPLSClock.nc:134: warning: return-type defaults to `int'


Can any one suggest me how to use hardware interrupts ???

What should be used in T2 instead of TOSH_INTERRUPT in T1

Thanks

Dheeraj Bheemidi


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20081209/15b12f3e/attachment.htm 


More information about the Tinyos-help mailing list