[Tinyos-devel] inconsistency between Telos and MicaZ I2C addressing

Kevin Klues klueska at gmail.com
Thu Sep 20 16:36:40 PDT 2007


Just to give my 2 cents (Or give my mustard to it as they say in
Germany).  I also agree that right justified is more intuitive.

Kevin

On 9/20/07, Xiaofan Jiang <fxjiang at eecs.berkeley.edu> wrote:
> Right justification may be slightly more intuitive but I'm comfortable with either as long as it's clearly stated in the interface file. But it sounds like there is a strong feeling towards right-justification on the help thread.
>
> -Fred
>
>
> ----- Original Message -----
> From: Philip Levis <pal at cs.stanford.edu>
> Date: Thursday, September 20, 2007 1:00 pm
> Subject: Re: [Tinyos-devel] inconsistency between Telos and MicaZ I2C addressing
>
> >
> > On Sep 14, 2007, at 3:50 PM, Xiaofan Jiang wrote:
> >
> > > Hi,
> > >
> > > I recently came across an inconsistency between Telos and MicaZ
> > I2C
> > > addressing scheme when I was porting my telos program to micaz.
> > >
> > > In Telos, the least significant 7 bits of the i2c address
> > argument
> > > is used whereas in MicaZ the most significant 7 bits is used.
> > >
> > > For example, to address an I2C device with the address 1010101,
> > in
> > > Telos, the command would be something similar to:
> > >
> > > call I2CPacket.write(I2C_START | I2C_STOP, 0x55, 1, &buff);
> > >
> > > but in MicaZ it would be:
> > >
> > > call I2CPacket.write(I2C_START | I2C_STOP, 0xAA, 1, &buff);
> > >
> > > It seems like those two should agree in one way or another.
> >
> > Agreed -- the MSP430 and atm128 maintainers should figure this out.
> >
> > IIRC, Jonathan Hui wrote the MSP430 implementation, and I wrote the
> >
> > atm128.
> >
> > As a programmer, which do you think was more intuitive, right-
> > justified or left-justified? I think I implemented the atm128 the
> > way
> > I did because that's how a datasheet wrote it.
> >
> > Phil
> >
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at Millennium.Berkeley.EDU
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>


-- 
~Kevin


More information about the Tinyos-devel mailing list