[ECOS] i2c bit-banging implementation

Bart Veer bartv@ecoscentric.com
Sat Jul 2 16:10:00 GMT 2005


>>>>> "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



More information about the Ecos-discuss mailing list