Can I define a macro that defines some stuff? I cannot get the following to
work

#define mymacro(foo, somenumber) \
#define foo (*(pFifo)foo##bar) \
Static uint8_t foo##bar[somenumber + sizeof(Fifo)]

The goal (maybe there is a better way...) is to have a variable length
buffer with some defined structure in the front.  A pointer to the struct is
passed around various routines.  

I could use a union: 

#define mymacro(foo, somenumber) \
Union {uint8_t buf[somenumber + sizeof(Fifo)]; Fifo fifo;} foo

And the user would have to use "&foo.fifo" as the reference, but I would
prefer to just type in "&foo" when calling routines.
----
Larry Barello
www.barello.net 




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to