Bug #1450: Illumos should be buildable with GCC4
lm75 ignores the half degree bit in writes
lm75(7D) allows setting of various temperatures, in a somewhat annoying format:
See http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS012658.PDF section 1.4.
Basically, we have 16bits: bit 15 is sign, bits 14-6 are temperature, bits 5-0 are ignored.
The temperature encoding doesn't actually matter, but the one bit of temperature in the 2nd byte is half a degree.
When we come to do this we do:
i2c_tran_pointer->i2c_wbuf = (temp16 >> 1); i2c_tran_pointer->i2c_wbuf = ((temp16 & 0xFE) << 7);
The mask on the second line removes the only bit we actually care about, losing us half a degree of temperature.