Hello Kim, > ...the I2CPacket interface shown seems to be exactly what I want. > However, the directory only contains the interface - not the > I2cPacketM and I2cPacketC files.
Yup. The interface file only specifies the API. I like to think of it as a glorified .h file :-) Hardware specific implementations will conform to this interface. This helps make TinyOS programs a bit more portable. What you need is the hardware specific implementation. > ...can you advise on how I can get the C and M files which match the > I2CPacket I/F that I want to use please. This will depend on the platform you are using. As a first cut I used the "find" command looked in the TinyOS 2.x cvs source code for files that provide the I2CPacket interface: ---- $ find . -iname "*i2c*" | xargs grep -l "provides.*I2CPacket" ./tos/chips/atm128/i2c/Atm128I2CMasterC.nc ./tos/chips/atm128/i2c/Atm128I2CMasterImplP.nc ./tos/chips/atm128/i2c/Atm128I2CMasterP.nc ./tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc ./tos/chips/msp430/usart/Msp430I2C0P.nc ./tos/chips/msp430/usart/Msp430I2CC.nc ./tos/chips/msp430/usart/Msp430I2CP.nc ./tos/chips/pxa27x/i2c/HalPXA27xI2CMasterC.nc ./tos/chips/pxa27x/i2c/HalPXA27xI2CMasterP.nc ---- This listing provides a good starting point. Depending on your hardware (ie. micaZ is based on the ATMega 128 processor so that would be things in atm128) you can begin looking at the chip specific providers of the I2CPacket interface. Note that you may need to dig down through a couple more layers of nested interfaces to see the bottom layer implementation. Best of luck, -Roy _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
