--- In [email protected], "Stéphane Herraiz"
<[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> First Merry Christmas!!!!
> I want to add DS1621 and DS1337 Maxim's components to my Foxboard LX.
> Looking on the SDK I see i2c drivers for this components in the
Linux 2.6 os
> (not in Linux 2.4 os???) in .../os/linux2.6/drivers/i2c/... .
> Do I have to configure the kernel when I compile the fimage?
> Do you have example of using this drivers? I'm a C beginner.
> Thank you
> BR
> -- 
> Stéphane Herraiz
>

Hi Stéphane,

First off, Merry Christmas to you too...

Second, if you want to use your devices with the FoxBoard, know that
this board has its own "dedicated" I2C driver.

The ones you're talking about, are the "general" ones, the ones used
in, for example, the PC world.

The I2C driver which is dedicated for the FoxBoard, is located in
"/devboard-R2_01/os/linux-2.6/arch/cris/arch-v10/drivers/" and is
using two dedicated FoxBoard I/O-pins to communicate to the "outside
world".

So, my guess is that you will have to use this driver to control your
device iso the ones you mentioned.

John (what's your last name, John?) has written an example code, which
you can use as a starting point.  The example code is located in
"devboard-R2_01/apps/i2c" and is called "i2c.c".  At least, if you
installed the Phrozen SDK distribution (Beta 1).

The advantage of the driver which is part of the Phrozen SDK (and
which is initially created by AB systems but is extended by John), is
that it can write whole messages to devices.  Something the original
driver was not able to do (could only send one byte at a time, which
is, of course "simple").

This example code is controlling a PCF8574 I/O-expander, but that
should be enough for you to get along and to modify it for your devices.

Best rgds,

--Geert




Reply via email to