error "function required"

General discussion on mikroC.
Post Reply
Author
Message
sionix
Posts: 7
Joined: 07 Apr 2005 01:08

error "function required"

#1 Post by sionix » 20 May 2005 23:30

i've that in that source ... please someone help ...


I2C_Init(100000);
while(!I2C_Is_Idle());
I2C_Start();
I2C_Wr(0xf0); // send byte via I2C (command to 24cO2)
I2C_Wr(ctrr);
I2C_Wr(spd); // send data (data to be written)
I2C_Stop();


when i build ... i get that error "function required" in that lines :
I2C_Start();
I2C_Stop();



someone help me please

regards
sionix @ Portugal

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: error "function required"

#2 Post by zristic » 21 May 2005 09:14

It seems that there is a constant called I2C_START and I2C_STOP. We tried to eliminated all possible traces of them, but they keep on resurrecting.:evil:

Please check the def file for your chip and rename the constants to I2C_START_ and I2C_STOP_.

The name of the def file is in the format P16FXXXdef.c and is located in the Defs folder of your installation.

sionix
Posts: 7
Joined: 07 Apr 2005 01:08

#3 Post by sionix » 21 May 2005 13:09

i'm using pic 18f458 ... i can't find out that in 18f458.c and 18f458.def

these files don't have any i2c_start and i2c_stop

regards
sionix @ Portugal

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

#4 Post by rajkovic » 21 May 2005 14:28

sionix wrote:i'm using pic 18f458 ... i can't find out that in 18f458.c and 18f458.def

these files don't have any i2c_start and i2c_stop

regards
Find 18f458.mcl file in defs folder and delete it then (close and reopen project) and compiler will rebuild 18f458.c file

sionix
Posts: 7
Joined: 07 Apr 2005 01:08

#5 Post by sionix » 21 May 2005 16:16

rajkovic great tks that solve my problem ;-)

regards
sionix @ Portugal

Post Reply

Return to “mikroC General”