embed_v
Junior Member level 1

hiii
i have some code with structure, enum, fun plz tell me the flow of code
for understanding structure and like other stuff.
i have some code with structure, enum, fun plz tell me the flow of code
for understanding structure and like other stuff.
Code:
enum A_MODE{
A = 0,
B,
C,
D,
E,
};
typedef struct _a_mode
{
unsigned int sen;
unsigned int state;
unsigned int last ;
unsigned int thick;
unsigned int count;
unsigned int status;
} A_MODE;
A_MODE a_modes[MAX];
int Execute(void)
{
(i am including only some part of this fun. )
case BILL_PICKING:
switch (a_mode[slot].sen)
{
case CASSETTE_A:
sensor = SENSOR_A;
break;
case CASSETTE_B:
sensor = SENSOR_B;
break;
}
if (sensor)
{
a_modes[slot].state = B;
a_modes[slot].last= TimingCount;
}
else
{}
}
}
Last edited: