36 int handle = open(bus, O_RDWR);
37 if (handle < 0) {
return -1; }
60 return (int16_t)((tmp >> 8) + ((tmp & 0xFF) << 8));
int i2c_openConnection(const char *bus)
Set up a connection to the specified bus.
void i2c_closeConnection(int handle)
Close existing connection.
int16_t i2c_swapbytes(const int16_t in)
Swap word byte order.