This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DECLARING VARIABLES (arrays) IN HEADER FILES

Hi,

There is a Q&A in keil database named "GENERAL: DECLARING VARIABLES IN HEADER FILES"
It shows how to declare single variables & initialize them in a header file.

When I use the same method for initializing an array the compiler generates a warning: "macro '_INIT': parameter count mismatch"
my code is:
_DECL unsigned char ToneDisp[16] _INIT({'D','1','2','3','4','5','6','7','8','9','0',0x2A,0x23,'A','B','C'});

How should I initialize the array?
The document mentioned above doesn't recommend this.What are the alternative solutions?

Thanks for your attention in advance
A.E.

0