Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

conditional run time settings

Status
Not open for further replies.

userx51

Junior Member level 2
Junior Member level 2
Joined
Apr 21, 2013
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,432
In my keil program, during the run time I like in my code to check a value and come up with the following:

depending on a variable, var1 , bypass one of the settings[] in below.like if var1 = 1, the settings would be the first one and if var = 2,the settings would be the second one.

Code:
struct SS
{
	int a,b,c,d;
};

static SS code settings[] =
{
	{1,2,3,4},
	{5,6,7,8}
};

static SS code settings[] =
{
	{1,2,3,4},
	{5,6,7,8},
	{9,10,11,12}
};

and also,

#define arrsz 10

if var = 2, arrsz for xbuf change to 20.

Code:
unsigned char xdata xbuf[arrsz];
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top