CTL_STATUS_t lm75_initialize_i2c_ex(CTL_TEMPERATURE_SENSOR_t *self, CTL_I2C_BUS_t *bus, int addr, int bits);
lm75_initialize_i2c_ex initializes the temperature sensor interface self with methods to communicate with an LM75-compatible temperature sensor on the I2C bus bus with 8-bit I2C address addr and bits bits of resolution.
Once the temperature sensor interface is initialized, you can use all standard temperature sensor methods from the sensor API on the interface.
Some compatibles, for instance the NXP LM75B, have extra resolution. The LM75B has 11 bits of resolution to resolve 0.125°C. In this case, you would call lm75_initialize_i2c_ex with bits set to 11.
lm75_initialize_i2c_ex returns a standard status code.
lm75_initialize_i2c_ex is thread-safe if the transport transport is thread-safe. Typically, for SPI and I2C transports, you ensure thread safety by associating a mutex with the bus used by the transport.