This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AT91 platform issue


Andrew Lunn wrote:
I would like a solution which makes the "exporting" of the i2c bus
configurable, so that if you don't want it you can disable it.

One way to handle this is to *not* list CYGPKG_IO_I2C as part of your target and make your actual I2C devices depend on this. This way, if the user leaves out CYGPKG_IO_I2C, your I2C support is disabled (by CDL). However, once they add the base I2C support (CYGPKG_IO_I2C) all your packages are also enabled.

This is done in many targets/drivers, so you have lots of examples
to check out.

There are two different things here, the bus and the devices on the
bus.

The devices need to be in the at91sam7seek packages since they are
specific to that development board.

The bus however is generic to all AT91 devices which has the TWI
interface. If you have the CYGPKG_DEVS_I2C_AT91 package loaded you can
export the bus. I would put the CYG_I2C_BUS() in your
CYGPKG_DEVS_I2C_AT9 package.

The problem here is that there is no clear example to follow in the
opens source code. eCosCentric will know more about this, so i hope
Bart or Jifl will reply as well about how they do this.

-- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]