A byte time is ~450us, so the LED is probably blinking so fast, you
can't actually see it.

And it is triggered for every byte of data received.

Have you tried:

if (cnt == 8) {
  call Leds.greenToggle();
}

that's the quick way to figure it out.

-Joe

On Sun, 20 Feb 2005 20:49:22 -0800, Affan, Syed <[EMAIL PROTECTED]> wrote:
> Hello,
> I am trying to use the RadioCoordinator interface implemented by
> CC1000RadioIntM, to get information when the first few bytes of my msg
> structure have been sent and then  proceed with some actuation. Here is
> my code.
> 
> async event void RadioSendCoord.byte(TOS_MsgPtr msg, uint8_t cnt)
>   {
> //struct BeaconForSync * beaconSync = (struct BeaconForSync *)msg->data;
> 
>     //call Leds.greenToggle();
> 
>         if (cnt >= (offsetof(struct TOS_Msg,data) + 3)
>                 && (msg->type == SYNC_BEACON)){
>                     call Leds.greenToggle();
>                 }
> 
>   }
> 
> Now first of all, no matter what I do the above event is triggered
> exactly once per packet transmission (I check this by toogling the red
> led when BareSendMsg.send() returns SUCCESS, and uncommenting the line
> in the code above). MY understanding was this should be triggered for
> every byte that is transmitted. Secondly, the if condition is never
> satisfied and I think the reason might very well be b/c the event is not
> triggered for that large a cnt value. What do I need to make the event
> trigger for every byte? And be able to do what I want?
> 
> Thanks.
> 
> Best Regards,
> Affan, Syed.
> 
> _______________________________________________
> Tinyos-users mailing list
> [email protected]
> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
>
_______________________________________________
Tinyos-users mailing list
[email protected]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to