Hi, It would do exactly what you want.
Andris On Tue, Mar 26, 2013 at 12:47 PM, mamzh <i-m-a...@hotmail.com> wrote: > Hi, anyone who cares > > I'm using Tinyos 2.x to integrate MMA8451 with micaz nodes. MMA8451 > is a sensor using I2C protocol. I2C has some flags such > as I2C_START, I2C_ACK_END, I2C_STOP, but no flags for Repeat start. What if > I use a sensor which using I2C this way, just like the picture attached? > > > It signal a repeat start flag after sending Device Address and > Register Address. Should I call I2C write command just with I2C_START,(no > I2C_STOP), and then call I2C read 1 byte command to get slave device's > data? like this: > > *call I2CPacket.write(I2C_START, MMA8451_I2C_ADDR, 1, i2cBuff);* > > *call I2CPacket.read(I2C_START|I2C_STOP, MMA8451_I2C_ADDR, 1, i2cBuff);* > > > It should have the same sequence as the picture described. > > Any comment will be appreciated. > > Best regards. > > _______________________________________________ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help