[En-Nut-Discussion] I2C (twi)

Matthias Ringwald mringwal at inf.ethz.ch
Wed Sep 14 19:23:08 CEST 2005


Hi Bernard,

> - I need to compile & link twif.c in my project.
depending on your build system, it might be already in your libarch  
(newer nut version
) or libdev (older versions)
if not, you should try to get in in there somehow.

> - I need to call TwInit(v) once (with v= some unused valeur if I'm  
> always master)
> - I need to call TwIOCtl(int,void *) once to set the bus speed.
> - I need to call TwMasterTransact() when needed.
I told my students roughly this (they didn't use TwIOCtl AFAIK)
and they confirmed that they sucessfully asked some i2c light sensor.

I've also asked for sample code, but didn't get is so far.

cheers,
matthias



More information about the En-Nut-Discussion mailing list