public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Bart Veer <bartv@ecoscentric.com>
To: clifford.joseph@clarinox.com
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] i2c bit-banging implementation
Date: Sat, 25 Jun 2005 13:10:00 -0000	[thread overview]
Message-ID: <20050625131035.A10AB65C0A4@smtp.ecoscentric.com> (raw)
In-Reply-To: <2415853226aa4e9ea1789842461c7ae1.clifford.joseph@clarinox.com>

>>>>> " " ==   <clifford.joseph@clarinox.com> writes:

     > I am trying to implement an i2c transfer by bit-banging
     <snip>

     > It still returns the same error when I compile
     > The error is
     > parse error before ?.? token

     <snip>

     > Looking at the varios instances where the CYG_HAL_TABLE_ENTRY
     > has been used in the other files it has been implemented in
     > this way. Example:

     >  cyg_httpd_table_entry __name CYG_HAL_TABLE_ENTRY( httpd_table ) =
     >     { __pattern, __handler, __arg }

     > where __pattern, __handler, __arg are the arguments passed on to the httpd_table

     > Can somebody help me regarding this

     > Has anybody been successful in implementing a bit-banging using the i2c package

     > Any idea why there is an error ?

     > parse error before ?.? Token

Yes, there have been successful implementations of the bit-bang code.
In fact the first ever I2C driver used bit-banging.

There is no significant difference between the cyg_httpd_table_entry
macro and the I2C bus one. The latter uses a gcc extension called
Designated Initializers,
http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/Designated-Inits.html#Designated%20Inits
The aim is to allow the cyg_i2c_bus structure to be changed in future,
including adding new fields at the start or in the middle of the
structure, without invalidating existing instances of the
CYG_I2C_BUS() macro.

Unfortunately it is not possible to tell from the error message
exactly what the problem is. To confuse things further I suspect the
original email has been garbled somewhere along the way.

I suggest you try compiling the source code in two steps. First use
gcc -E to just run the preprocessor on the file. Then compile the
resulting file normally. This should give you a line number for the
parse error, and a matching source file without the potentially
confusing macros.

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

  reply	other threads:[~2005-06-25 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-23  0:28 clifford.joseph
2005-06-25 13:10 ` Bart Veer [this message]
2005-07-01  5:10 clifford.joseph
2005-07-02 16:10 ` Bart Veer
2005-07-14  2:13 clifford.joseph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050625131035.A10AB65C0A4@smtp.ecoscentric.com \
    --to=bartv@ecoscentric.com \
    --cc=clifford.joseph@clarinox.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).