Lines Matching full:reading
160 int SmbpbiSensor::i2cReadDataBytesDouble(double& reading)
165 static_assert(length == sizeof(reading), "Unsupported arch");
173 // there is no value updated from HMC if reading data is all 0xff
174 // Return NaN since reading is already a double
177 reading = std::numeric_limits<double>::quiet_NaN();
185 std::memcpy(&reading, &tempd, sizeof(reading));
190 int SmbpbiSensor::i2cReadDataBytesUI64(uint64_t& reading)
195 static_assert(length == sizeof(reading), "Unsupported arch");
203 reading = 0;
206 reading |= static_cast<uint64_t>(buf[byteI]) << (8 * byteI);
212 int SmbpbiSensor::i2cReadDataBytes(uint8_t* reading, int length)
259 msgs[1].buf = reading;
273 uint64_t reading = 0;
274 int ret = i2cReadDataBytesUI64(reading);
280 if (checkInvalidReading(reinterpret_cast<uint8_t*>(&reading),
281 sizeof(reading)))
286 lg2::debug("offset: {OFFSET} reading: {READING}", "OFFSET", offset,
287 "READING", reading);
291 data = convert2Temp(reinterpret_cast<uint8_t*>(&reading));
296 data = convert2Power(reinterpret_cast<uint8_t*>(&reading));
300 data = reading / 1000.0; // mJ to J (double)
304 data = reading; // Voltage
311 double reading = 0;
312 int ret = i2cReadDataBytesDouble(reading);
317 data = reading;
337 // Sensor reading value types are sensor-specific. So, read