CTL_STATUS_t ctl_temperature_sensor_set_resolution(CTL_TEMPERATURE_SENSOR_t *self,
                                                   float resolution);

ctl_temperature_sensor_set_resolution configures the temperature sensor to deliver measurements with a resolution of resolution degrees Celsius. For instance, standard LM75 temperature sensors deliver measurements with a resolution of 0.5 degree Celsius, but compatibles such as the TMP100 can deliver measurements with a resolution of 1/16th of a degree. Hence, you can configure a capable temperature sensor for results resolved to a quarter of a degree Celsius by setting resolution to 0.25.

Return Value

ctl_temperature_sensor_set_resolution returns a standard status code.

Thread Safety

ctl_temperature_sensor_set_resolution is thread-safe if the method set_resolution is thread-safe. Typically, for SPI and I2C transports, you ensure thread safety by associating a mutex with the bus used by the transport.