unlike Michael, I have intercourse regularily with nx_types.

they are implemented as big endian byte arrays.   And referenced using well
known byte swappers on little endian machines automatically.

On Mon, Jul 25, 2011 at 2:13 PM, Michael Schippling <[email protected]>wrote:

> I don't have no intercourse with nx_types but it might
> be that app_period is not being re-converted back to
> the right byte order. Does it work with reset(10)?
>

I see two choices for figuring this out (there maybe more but two stand out
on the ledge to me).

1) use a real embedded debugger to see exactly what is going on.

or

2) study the generated code and play computer and see if it is doing what
you expect.

I don't see anyway we can by inspection using the data we have out here in
the wild can figure out from what you are telling us what is going on.

Not enough data.

eric


>
> Also, please define "crazy timer"....
>

timer grabs a knife and attacks a tank while muttering gibberish  :-)



>
> MS
>
>
> [email protected] wrote:
> > Thanks a million Michael
> >
> > there still is something that doesn't work:
> >
> > if I do:
> > call MyTimer.startPeriodic(1024L * (uint16_t) (sync_msg.app_period));
> > where 'period' is a 'nx_uint16_t' inside the struct 'sync_msg'
> > everything works fine
> >
> >
> > on the other hand, if I use a function like:
> >
> > reset((uint16_t) (sync_msg.app_period))
> >
> > ...
> >
> > reset (uint16_t period){
> >    call MyTimer.startPeriodic(1024L * (uint16_t) period);
> > }
> >
> > the timer goes crazy
> >
> > any idea why? am I doing something wrong casting the value?
> >
> > Davide
> >
> > On 25 Jul 2011, at 17:14, Michael Schippling wrote:
> >
> >> long integer
> >>
> >> [email protected] wrote:
> >>> Hi,
> >>> An easy question:
> >>> What the 'L' stands for when assigning the period to a timer? for
> example
> >>> call MyTimer.startPeriodic(1024 * 10L);
> >>> it starts a periodic timer that fires every 10 seconds but what's the
> meaning of 'L'
> >>> I couldn't find it in google...
> >>> thanks
> >>> Davide
> >>> _______________________________________________
> >>> Tinyos-help mailing list
> >>> [email protected]
> >>>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to