Gemalto is now part of the Thales Group, find out more.

You are here

SPI Class --Looking for information -- | Thales IoT Developer Community

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

Hello,

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) Connector.open("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());
outStream.flush()

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

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

Regards.
GF