Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

SPI Class --Looking for information -- | Telit Cinterion IoT Developer Community

November 15, 2014 - 3:05pm, 2768 views


I am working with TC65i.I need to use the SPI class --SpiConnection.I did not find any information in order to use this class.I have read that is very similar to I2C Connection.

Open I2C connection and data streams:
i2cConnection cc = (I2cBusConnection)"i2c:0;baudrate=100");
int baudrate = cc.getBaudRate();
InputStream inStream  = cc.openInputStream();
OutputStream outStream = cc.openOutputStream();
// Write Transfer Frame, where a = message ID, AE = Slave Address and write 
// request:
String data = "<aAE000102030405060708090A0B0C0E0F>";
outStream.write(data.getBytes(), 0, data.length());

So is this OK? -->
spiConnection cc = (spiBusConnection)"i2c:0;baudrate=100");

Would you please point me into the right direction to find some information in order to use this class?