[Tinyos-help] Problems using enums

Andy Dalton andy.dalton at gmail.com
Mon Feb 12 22:58:12 PST 2007


You might expect to see something like that if one or more of the enum
constants were preprocessor macros.

Consider something like:

    #define INIT 0x0001
    ...
    enum {INIT, BUSY};
    ...

That would get turned into:

    enum (0x0001, BUSY);

... which would cause the compiler to be unhappy :-).

Andy

On 2/12/07, Michael Schippling <schip at santafe.edu> wrote:
> huh...off the top of my, admittedly pointy, head I would think
> that adding an identifier to the enum would separate the name
> spaces and allow you to reuse the symbols in the proper contexts.
>
> whadayaknow...
> MS
>
>
> Ankur Kamthe wrote:
> > hi Michael,
> >
> > I found out my mistake. It seems INIT, BUSY are already used by telosb
> > platform someplace. I replaced the names and it worked.
> >
> > thanks,
> > ankur


More information about the Tinyos-help mailing list