I faithfully typed in all the I2C code from philips application notes, AN10155. I get the following when I compile in Keil:
Build target 'Target 1' assembling START900.A51... compiling demo.c... I2CEXPRT.H(65): error C141: syntax error near 'using' I2CEXPRT.H(65): error C141: syntax error near '1' DEMO.C(12): error C129: missing ';' before 'char' compiling I2CINTF.c... I2CEXPRT.H(65): error C141: syntax error near 'using' I2CEXPRT.H(65): error C141: syntax error near '1' I2CINTF.C(3): error C141: syntax error near 'char', expected ')' I2CINTF.C(5): error C129: missing ';' before 'char' compiling I2CDRIVR.C... I2CEXPRT.H(65): error C141: syntax error near 'using' I2CEXPRT.H(65): error C141: syntax error near '1' I2CDRIVR.C(19): error C141: syntax error near 'interrupt' I2CDRIVR.C(19): error C141: syntax error near '6' I2CDRIVR.C(19): error C141: syntax error near '1' I2CDRIVR.C(21): error C141: syntax error near 'STAT' I2CDRIVR.C(21): error C202: 'STAT': undefined identifier I2CDRIVR.C(23): error C172: 'case': missing enclosing switch I2CDRIVR.C(25): error C171: 'break': missing enclosing loop I2CDRIVR.C(26): error C172: 'case': missing enclosing switch I2CDRIVR.C(27): error C172: 'case': missing enclosing switch I2CDRIVR.C(30): error C171: 'break': missing enclosing loop I2CDRIVR.C(31): error C172: 'case': missing enclosing switch I2CDRIVR.C(32): error C172: 'case': missing enclosing switch Target not created
Exactly what settings must keil uVision be in in order to compile philips application notes code for AN10155?
Is this possibly just a syntax problem?
It may solve your errors, but check your project settings
xdata char retryexp[] = "retry counter expired\n"; xdata char bufempty[] = "buffer empty\n"; xdata char nackdata[] = "no ack on data\n"; xdata char nackaddr[] = "no ack on address\n"; xdata char timedout[] = "time-out\n"; xdata char unknowst[] = "unknown status\n";
... use CodeArchitect, free from http://www.esacademy.com .
I used it as a base for my LPC (and SILabs derivative) IIC code and found it an excellent base.
I had a quick glance at the appnote and just after 1 minute it was eveident that had it been me I would not have used it.
Erik
Jack Sprat wrote: "You really ought to use some method of identifying the post and person you're replying to."
Point taken.
"I was merely pointing out to Erik that he is in fact a regular commenter on posting style [...]"
However, your constructive to destructive posting ratio isn't so very high. You seems to have the knowledge: Is it that you refuse to spend time helping people, but find it enjoiyable to pick a victim to constantly hunt?
Yes, Erik has a very pushy style, but that doesn't change the fact that you seem to be the kind of person who like to stroke a cat backwards. You know that Erik has a bit of a temper problem, and your main reason for visiting this forum seems to be focused on how best to light the fuse.
A more productive way of disagreeing with someone is to post your view of things, directed at the OP. But that is not the Jack Sprat style. You want to make sure that Erik will see the red cape.
You could improve the climate of this forum a lot if you just bothered. But maybe it wouldn't be as fun (for you).
Per,
You have a real knack for understatement!