From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27636 invoked by alias); 15 Jun 2005 03:19:59 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 27613 invoked by uid 22791); 15 Jun 2005 03:19:56 -0000 Received: from ozhmx1.ozhosting.com (HELO ozhmx1.ozhosting.com) (203.30.164.229) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 15 Jun 2005 03:19:56 +0000 Received: from ozhmail1.ozhosting.com (ozhmail1.ozhosting.com [203.30.164.236]) by ozhmx1.ozhosting.com (Postfix) with ESMTP id 850AE34607 for ; Wed, 15 Jun 2005 13:19:53 +1000 (EST) Received: from clarinox.com (unverified [127.0.0.1]) by ozhmail1.ozhosting.com (Vircom SMTPRS 4.1.361.9) with ESMTP id for ; Wed, 15 Jun 2005 13:19:51 +1000 Message-ID: <716f48379b9f45399e3f65a19665bb23.clifford.joseph@clarinox.com> X-EM-APIVersion: 2, 0, 1, 0 From: "" To: ecos-discuss@ecos.sourceware.org Date: Wed, 15 Jun 2005 03:19:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [ECOS] adding a new i2c device X-SW-Source: 2005-06/txt/msg00102.txt.bz2 Hi I am trying to implement an i2c transfer. I have successfully added the hardware package CYGPKG_IO_I2C to my configur= ation file. (.ecc) Iam working on the eb40a evaluation board which has already an i2c device a= t24c512 eeprom.=20 I am using arm-elf-gcc version 3.2.1 As described I have added this in my plf_io.h #define HAL_I2C_EXPORTED_DEVICES \ extern cyg_i2c_bus cyg_i2c_xyzzy_bus; \ extern cyg_i2c_device cyg_i2c_wallclock_ds1307; \ extern cyg_i2c_device cyg_i2c_eeprom; and in my main.cpp file I have implemented the following function static cyg_bool hal_alaia_i2c_bitbang(cyg_i2c_bus* bus, cyg_i2c_bitbang_op op) { cyg_bool result =3D 0; =20=20=20=20 switch(op)=20 { case CYG_I2C_BITBANG_INIT: { } case CYG_I2C_BITBANG_SCL_HIGH: { } =85.. =85.. =85. =85.. =2E } return result; } I am creating a device by using the Macro CYG_I2C_DEVICE(cyg_i2c_eeprom, cyg_i2c_xyzzy_bus, 0xA0, 0x00,CYG_I2C_DEFAUL= T_DELAY); Am I doing it the way it should be done because I get a compile error=20 parse error before `.' token=20 at the line wherever I call this macros. thank you clifford -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss