public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]  typo in i2c example in reference manual?
@ 2007-02-17 16:50 Grant Edwards
  2007-02-19 17:09 ` Bart Veer
  0 siblings, 1 reply; 7+ messages in thread
From: Grant Edwards @ 2007-02-17 16:50 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-24 17:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-17 16:50 [ECOS] typo in i2c example in reference manual? Grant Edwards
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

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).