This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Macro declarations


I have defined the macro as follows in my header file:

typedef struct lcd_funs lcd_funs;
struct lcd_funs {
 void (*decode_image)(cyg_uint32 imageWidth,
		       cyg_uint32 imageHeight,
		       Palette_element *paletteData,
		       cyg_uint8  *imageData,
		       cyg_uint16 bitsPerPixel
		       );
};

#define LCD_FUNS (  _l,                       \
	              _decode_image)    \
lcd_funs _l = {                                     \
 _decode_image                                  \
};

struct view_info{
 lcd_funs     *funs;
}; //view_info

#define VIEW_INFO  (_l,           \
                   _funs )                \
view_info _l = {                        \
 &_funs                                   \
};

I include it in my code file like this:

LCD_FUNS  (nec_lcd_funs,                     // line 87
	   nec_decode_image           //  line 88
	  );

VIEW_INFO (nec_view_info,    //label
	   nec_lcd_funs
	  );

On compilation, it gives parse error on line 87. Any idea?
Also, when using eCos config tool, we just point to the folder where host and target compilers reside. Where can we change the make scripts that are used in compiling the code in the repository? Eg. to add the switch -E to gcc?


Thanks
Samie

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]