public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS]  typo in i2c example in reference manual?
Date: Sat, 17 Feb 2007 16:50:00 -0000	[thread overview]
Message-ID: <er7bos$mb6$1@sea.gmane.org> (raw)

I tried to follow the example in the reference manual shown below:

   Instantiating a bit-banged I2C bus requires the following:
   
      #include <cyg/io/i2c.h>                                         
                                                                      
      static cyg_bool                                                 
      hal_alaia_i2c_bitbang(cyg_i2c_bus* bus, cyg_i2c_bitbang_op op)  
      {                                                               
          cyg_bool result    = 0;                                     
          switch(op) {                                                
              ...
          }                                                           
          return result;                                              
      }                                                               
                                                                      
      CYG_I2C_BITBANG_BUS(&hal_alaia_i2c_bus, &hal_alaia_i2c_bitbang);
   
   This gives a structure hal_alaia_i2c_bus which can be used when defining the
   cyg_i2c_device structures.

I get a syntax error unless I remove the "&" before
hal_alaia_i2c_bus.  If this macro is declaring and allocating
(is that what "gives" means in this context?) a structure named
"hal_alaia_i2c_bus", the "&" doesn't really make sense.
   
-- 
Grant Edwards                   grante             Yow!  Hold the MAYO & pass
                                  at               the COSMIC AWARENESS...
                               visi.com            


-- 
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:[~2007-02-17 16:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-17 16:50 Grant Edwards [this message]
2007-02-19 17:09 ` Bart Veer
2007-02-19 17:34   ` [ECOS] " Grant Edwards
2007-02-22 22:53     ` Bart Veer
2007-02-23  4:28       ` Grant Edwards
2007-02-24 15:52       ` Grant Edwards
2007-02-24 17:03       ` Grant Edwards

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='er7bos$mb6$1@sea.gmane.org' \
    --to=grante@visi.com \
    --cc=ecos-discuss@sources.redhat.com \
    /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).