embed_v
Junior Member level 1
hii this my code :
my logic is that i have to read the current sensor data on appropriate dip sw.
for that i define the structure for sensor ,also int Read_sensor_id(int Dip_Switch) for to read sensor data on sw.
but when i complied the err occoured:
Error: L6200E: Symbol infor multiply defined (by delay.o and commands.o).
Error: L6200E: Symbol infor multiply defined (by i2c.o and commands.o).
Error: L6200E: Symbol infor multiply defined (by sensor.o and commands.o).
i think logic is ok but somthing wrg in structure....?????????
my logic is that i have to read the current sensor data on appropriate dip sw.
for that i define the structure for sensor ,also int Read_sensor_id(int Dip_Switch) for to read sensor data on sw.
but when i complied the err occoured:
Error: L6200E: Symbol infor multiply defined (by delay.o and commands.o).
Error: L6200E: Symbol infor multiply defined (by i2c.o and commands.o).
Error: L6200E: Symbol infor multiply defined (by sensor.o and commands.o).
i think logic is ok but somthing wrg in structure....?????????
Code:
struct sensor
{
U8 sensr_id;
U8 opto_read;
}infor;
int Read_sensor_id(int Dip_Switch)
{
int sensor_id;
Dip_Switch = DIP_SWITCH; //4bit dipsw
switch (Dip_Switch)
{
case 0:
sensor_id = SENSOR_ID0;
break;
case 1:
sensor_id = SENSOR_ID1;
break;
case 2:
sensor_id = SENSOR_ID2;
default:
sensor_id = -1;
break;
}
return sensor_id;
}
int Read_sensor_current_id(int curr_id)
{
curr_id = Read_Cassette_id(infor.sensr_id);
return curr_id;
}