This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: i2c bit-banging implementation
- From: Bart Veer <bartv at ecoscentric dot com>
- To: clifford dot joseph at clarinox dot com
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Sat, 2 Jul 2005 17:10:43 +0100 (BST)
- Subject: Re: [ECOS] i2c bit-banging implementation
- References: <959e269faa6545069d922c92830300ba.clifford.joseph@clarinox.com>
>>>>> "Clifford" == <clifford.joseph@clarinox.com> writes:
Clifford> Thank you for the reply
Clifford> I am sending you the exact information printed after
Clifford> compiling
Clifford> L2CapDataClientMain=2Ecpp is where main() is
Clifford> i have compiled the code with g++ -E -g
Clifford> this is the message i get
<snip>
As Andrew has already said, this is not exactly what I had in mind.
However I think I have now figured out what the problem is. The I2C
macros use the gcc designated inits language extension, and it turns
out that g++ does not implement this extension, This is a rather
unfortunate discrepancy, but may be inevitable because of the
differences in language syntax. If I try to instantiate an I2C bus or
device in C++ code I get errors like:
i2c.cxx:154: error: expected primary-expression before '.' token
Not quite the error message you are seeing, but we may be using
different versions of the compiler.
The solution for now is to instantiate the I2C bus and devices in C
code instead of C++.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss