This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: Does i2c module work in RedBoot?
>>>>> "Grant" == Grant Edwards <grante@visi.com> writes:
Grant> On 2007-02-12, wang cui <iucgnaw@msn.com> wrote:
>>> Does the i2c package work for RedBoot?
>> Yes, I use it to drive WallClock chip in RedBoot.
Grant> Thanks. I've heard from a couple others who also use the
Grant> i2c module in RedBoot.
Grant> I glanced at the souce code and noticed calls to mutex
Grant> routines and wasn't sure if that would cause problems or
Grant> not.
Those calls involve the driver API rather than the kernel API,
allowing the generic I2C code to work correctly in both a
multi-threaded kernel configuration and in a polled-only configuration
like RedBoot. However note that it is not just the generic I2C support
CYGPKG_IO_I2C you need to worry about. Typically there will also be
a hardware-specific device driver and that needs to do the right thing
as well. Usually that is not hard - in the tx and rx routines check
whether or not interrupts are enabled and then either poll or wait for
the interrupt - but some device drivers may not bother.
If instead of a driver for some I2C bus master hardware you are using
the bitbanging support in the generic package, that is usable in both
interrupt-driven and polled environments.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
Besuchen Sie uns vom 13.-15.02.07 auf der Embedded World 2007, Stand 11-336
Visit us at Embedded World 2007, Nürnberg, Germany, 13-15 Feb, Stand 11-336
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss