Synopsis
typedef struct {
CTL_TRANSPORT_t transport;
CTL_STATUS_t (*set_resolution)(CTL_TEMPERATURE_SENSOR_s *, float);
CTL_STATUS_t (*measure)(CTL_TEMPERATURE_SENSOR_s *, float *);
float resolution;
int __bits;
unsigned short __mode;
} CTL_TEMPERATURE_SENSOR_t;
Description
CTL_TEMPERATURE_SENSOR_t is an abstract temperature sensor interface that provides
clients with a means to sample temperature.
Structure
-
transport
- The underlying transport for the magnetometer which provides,
typically, an I2C or SPI connection to the device and a means
to read one or more registers from the device.
-
set_resolution
- Method to set the resolution of the temperature sensor. Some
temperature sensors may well not support configurable resolution.
-
measure
- Method to measure the temperature.