[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] recommendation for coding convention on state variables

Philip Levis pal at cs.stanford.edu
Thu Oct 13 10:47:55 PDT 2005


On Oct 13, 2005, at 9:57 AM, David Gay wrote:

>
> There is, alas, a cost. enum's are stored (as per the C spec) as ints,
> so take two bytes.

Ah. I had thought that enums were scaled to the minimum sized  
primitive type that would fit the possible values.

>
> Three  fixes:
> - use uint8_t, like we've been doing...

I think this is the best solution. I had recommended the enum thing  
as I had thought it was an easy way to make JTAG a bit easier with no  
cost. If there's any cost, it's not worth it. (I consider packed and  
passing additional compiler options a cost.)

Phil

_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg


More information about the Tinyos-host-mote-wg mailing list