I am having issues with this I2C sample code they give in this application note! I have written it word for word and when i make it gives the following error:
In file included from main.c:10:
I2C.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘void’
it’s relating to the following line in my I2C.h
__irq void I2C_ISR();
it doesnt like the __ before the irq! how can i fix this?
ive changed my mind now and am just writing data out through the SDA line…i’m getting datd out but my target part which is the SAA1064 isn’t responding argh!
Well it’s definitely a compile error. The compiler doesn’t like the __irq notation. Is this a macro defined somewhere? IF so, are you missing an #include? If not, are you using the same compiler recommended in the application note?
i think u might b right…i’m just copying what was written in the app note! I havent defined the function anywhere…in my crt.S file this is defined…__irq: b . // IRQ
seema:
actually i’m not sure how to do those things!
Don’t look at me, dude. I’ve done a bit of programming in my time (enough to recognize a compiler error), but I’m afraid the specifics are alittle over my head. Sorry…