Skip to main content

Module sensors

Module sensors 

Source
Expand description

The C ABI for the sensor drivers.

These functions wrap [pamoja_sensors] for callers that reach the SDK through the flat C boundary: the decode half of eleven common parts, turning the register bytes a bus driver read into the physical reading the datasheet says they mean, and the inverse builders that produce those bytes again.

A reading is a handful of scalars, so it crosses by value as a #[repr(C)] struct rather than as a handle. The exceptions are the BME280 and BMP280 calibrations, which are read once at start-up and then reused for every measurement, so each is a handle the caller keeps.

Enumerated settings cross as the code the datasheet prints, because that is what a caller holding a register value already has in front of them, and booleans cross as a uint8_t that is 1 for the state its name describes.

A part that carries its own checksum, an undefined register code, or an identification register reports a mismatch as PamojaStatus::Codec, so a caller re-reads rather than trusting the value.

Structs§

PamojaAds1115Config
An ADS1115 configuration register, field by field.
PamojaBme280Calibration
An opaque handle to a BME280’s factory calibration.
PamojaBme280Measurement
A compensated BME280 reading.
PamojaBmp280Calibration
An opaque handle to a BMP280’s factory calibration.
PamojaBmp280Coefficients
A BMP280’s per-chip trimming coefficients, as they sit in its registers.
PamojaBmp280Config
A BMP280 config register, field by field.
PamojaBmp280CtrlMeas
A BMP280 ctrl_meas register, field by field.
PamojaBmp280Measurement
The uncompensated codes a BMP280 burst read carries.
PamojaBmp280Reading
A compensated BMP280 reading.
PamojaDs18b20Reading
A decoded DS18B20 scratchpad.
PamojaHdc1080Config
An HDC1080 configuration register, field by field.
PamojaHdc1080Measurement
A decoded HDC1080 temperature and humidity pair.
PamojaIna226Config
An INA226 configuration register, field by field.
PamojaIna226DieId
A decoded INA226 die-ID register.
PamojaIna226MaskEnable
An INA226 Mask/Enable register, field by field.
PamojaOpt3001Config
An OPT3001 configuration register, field by field.
PamojaScd4xMeasurement
A decoded SCD4x measurement frame.
PamojaSht3xMeasurement
A decoded SHT3x temperature and humidity pair.
PamojaSht3xStatus
A decoded SHT3x status register.
PamojaTmp117Config
A TMP117 configuration register, field by field.

Enums§

PamojaIna226AlertFunction
The limit comparison an INA226 alert pin responds to.

Constants§

PAMOJA_BME280_CALIBRATION_HUMIDITY_LEN
The number of calibration bytes a BME280 reports for humidity.
PAMOJA_BME280_CALIBRATION_TEMP_PRESS_LEN
The number of calibration bytes a BME280 reports for temperature and pressure.
PAMOJA_BME280_MEASUREMENT_LEN
The number of measurement bytes a BME280 burst read returns.
PAMOJA_BMP280_CALIBRATION_LEN
The number of calibration bytes a BMP280 reports.
PAMOJA_BMP280_CHIP_ID
The value a BMP280’s chip-ID register reads, which confirms the part.
PAMOJA_BMP280_DATA_LEN
The number of measurement bytes a BMP280 burst read returns.
PAMOJA_BMP280_I2C_ADDRESS_PRIMARY
The address a BMP280 answers on with its SDO pin low.
PAMOJA_BMP280_I2C_ADDRESS_SECONDARY
The address it answers on with SDO high.
PAMOJA_BMP280_REGISTER_CALIBRATION
The first of the 24 BMP280 calibration registers.
PAMOJA_BMP280_REGISTER_CHIP_ID
The BMP280 chip-ID register.
PAMOJA_BMP280_REGISTER_CONFIG
The BMP280 config register.
PAMOJA_BMP280_REGISTER_CTRL_MEAS
The BMP280 ctrl_meas register.
PAMOJA_BMP280_REGISTER_DATA
The first of the six BMP280 data registers.
PAMOJA_BMP280_REGISTER_RESET
The BMP280 reset register.
PAMOJA_BMP280_REGISTER_STATUS
The BMP280 status register.
PAMOJA_BMP280_RESET_WORD
The byte written to the reset register to restart a BMP280.
PAMOJA_BMP280_SKIPPED_OUTPUT
The raw code a BMP280 reports when oversampling is off and nothing was measured.
PAMOJA_DS18B20_SCRATCHPAD_LEN
The number of bytes in a DS18B20 scratchpad, the ninth being its CRC.
PAMOJA_HDC1080_CONFIGURATION_RESET
The value its configuration register reads after a reset.
PAMOJA_HDC1080_DEVICE_ID
The value its device-ID register reads, which confirms the part.
PAMOJA_HDC1080_I2C_ADDRESS
The single address an HDC1080 answers on.
PAMOJA_HDC1080_MANUFACTURER_ID
The value its manufacturer-ID register reads: TI.
PAMOJA_HDC1080_MEASUREMENT_LEN
The number of bytes an HDC1080 sequential read returns.
PAMOJA_HDC1080_REGISTER_CONFIGURATION
The HDC1080 configuration register.
PAMOJA_HDC1080_REGISTER_DEVICE_ID
The HDC1080 device-ID register.
PAMOJA_HDC1080_REGISTER_HUMIDITY
The HDC1080 humidity register.
PAMOJA_HDC1080_REGISTER_MANUFACTURER_ID
The HDC1080 manufacturer-ID register.
PAMOJA_HDC1080_REGISTER_SERIAL_ID_HIGH
The high word of the HDC1080 serial ID.
PAMOJA_HDC1080_REGISTER_SERIAL_ID_LOW
The low word of the HDC1080 serial ID.
PAMOJA_HDC1080_REGISTER_SERIAL_ID_MID
The middle word of the HDC1080 serial ID.
PAMOJA_HDC1080_REGISTER_TEMPERATURE
The HDC1080 temperature register.
PAMOJA_HDC1080_SERIAL_ID_REGISTERS
The number of serial-ID registers an HDC1080 carries.
PAMOJA_INA226_BASE_ADDRESS
The address an INA226 answers on with both address pins tied to GND.
PAMOJA_INA226_BUS_LSB_MICROVOLTS
The bus-voltage resolution, in microvolts per count.
PAMOJA_INA226_CONFIG_RESET
The value its configuration register reads after a reset.
PAMOJA_INA226_DEVICE_ID
The device identifier its die-ID register carries.
PAMOJA_INA226_MANUFACTURER_ID
The value its manufacturer-ID register reads: TI.
PAMOJA_INA226_POWER_LSB_RATIO
How many times the power resolution is the current resolution.
PAMOJA_INA226_REGISTER_ALERT_LIMIT
The INA226 alert-limit register.
PAMOJA_INA226_REGISTER_BUS_VOLTAGE
The INA226 bus-voltage register.
PAMOJA_INA226_REGISTER_CALIBRATION
The INA226 calibration register.
PAMOJA_INA226_REGISTER_CONFIGURATION
The INA226 configuration register.
PAMOJA_INA226_REGISTER_CURRENT
The INA226 current register.
PAMOJA_INA226_REGISTER_DIE_ID
The INA226 die-ID register.
PAMOJA_INA226_REGISTER_MANUFACTURER_ID
The INA226 manufacturer-ID register.
PAMOJA_INA226_REGISTER_MASK_ENABLE
The INA226 Mask/Enable register.
PAMOJA_INA226_REGISTER_POWER
The INA226 power register.
PAMOJA_INA226_REGISTER_SHUNT_VOLTAGE
The INA226 shunt-voltage register.
PAMOJA_INA226_SHUNT_LSB_NANOVOLTS
The shunt-voltage resolution, in nanovolts per count.
PAMOJA_OPT3001_CONFIGURATION_RESET
The value its configuration register reads after a reset.
PAMOJA_OPT3001_DEVICE_ID
The value its device-ID register reads, which confirms the part.
PAMOJA_OPT3001_HIGH_LIMIT_RESET
The value its high-limit register reads after a reset.
PAMOJA_OPT3001_I2C_ADDRESS_GND
The address an OPT3001 answers on with its ADDR pin tied to GND.
PAMOJA_OPT3001_I2C_ADDRESS_SCL
The address it answers on with ADDR tied to SCL.
PAMOJA_OPT3001_I2C_ADDRESS_SDA
The address it answers on with ADDR tied to SDA.
PAMOJA_OPT3001_I2C_ADDRESS_VDD
The address it answers on with ADDR tied to VDD.
PAMOJA_OPT3001_LOW_LIMIT_END_OF_CONVERSION
The low-limit value that turns the INT pin into an end-of-conversion signal.
PAMOJA_OPT3001_LOW_LIMIT_RESET
The value its low-limit register reads after a reset.
PAMOJA_OPT3001_MANUFACTURER_ID
The value its manufacturer-ID register reads: TI.
PAMOJA_OPT3001_RANGE_AUTOMATIC
The range number that lets the part choose its own full scale.
PAMOJA_OPT3001_RANGE_MAX
The highest fixed range number the part defines.
PAMOJA_OPT3001_REGISTER_CONFIGURATION
The OPT3001 configuration register.
PAMOJA_OPT3001_REGISTER_DEVICE_ID
The OPT3001 device-ID register.
PAMOJA_OPT3001_REGISTER_HIGH_LIMIT
The OPT3001 high-limit register.
PAMOJA_OPT3001_REGISTER_LEN
The number of bytes in an OPT3001 register read.
PAMOJA_OPT3001_REGISTER_LOW_LIMIT
The OPT3001 low-limit register.
PAMOJA_OPT3001_REGISTER_MANUFACTURER_ID
The OPT3001 manufacturer-ID register.
PAMOJA_OPT3001_REGISTER_RESULT
The OPT3001 result register.
PAMOJA_SCD4X_CO2_MAX_PPM
The highest carbon dioxide concentration an SCD4x reports, in parts per million.
PAMOJA_SCD4X_COMMAND_GET_AUTOMATIC_SELF_CALIBRATION_ENABLED
Reads whether automatic self-calibration is on.
PAMOJA_SCD4X_COMMAND_GET_DATA_READY_STATUS
Reads whether a fresh result is waiting.
PAMOJA_SCD4X_COMMAND_GET_SENSOR_ALTITUDE
Reads the configured altitude back.
PAMOJA_SCD4X_COMMAND_GET_SERIAL_NUMBER
Reads the 48-bit serial number, three words with their CRCs.
PAMOJA_SCD4X_COMMAND_GET_TEMPERATURE_OFFSET
Reads the temperature offset back.
PAMOJA_SCD4X_COMMAND_LEN
The number of bytes in an SCD4x command frame.
PAMOJA_SCD4X_COMMAND_MEASURE_SINGLE_SHOT
Takes one measurement on demand, an SCD41 command.
PAMOJA_SCD4X_COMMAND_MEASURE_SINGLE_SHOT_RHT_ONLY
Takes one humidity and temperature measurement without the photoacoustic cell.
PAMOJA_SCD4X_COMMAND_PERFORM_FACTORY_RESET
Restores the factory settings, discarding the stored calibration.
PAMOJA_SCD4X_COMMAND_PERFORM_FORCED_RECALIBRATION
Recalibrates against a known concentration and returns the correction applied.
PAMOJA_SCD4X_COMMAND_PERFORM_SELF_TEST
Runs the on-board self test, which takes ten seconds.
PAMOJA_SCD4X_COMMAND_PERSIST_SETTINGS
Stores the current settings in non-volatile memory.
PAMOJA_SCD4X_COMMAND_POWER_DOWN
Puts an SCD41 into its lowest-power state.
PAMOJA_SCD4X_COMMAND_READ_MEASUREMENT
Reads the latest carbon dioxide, temperature, and humidity words.
PAMOJA_SCD4X_COMMAND_REINIT
Reloads the stored settings without a power cycle.
PAMOJA_SCD4X_COMMAND_SET_AMBIENT_PRESSURE
Writes the ambient pressure, which may be sent during a measurement.
PAMOJA_SCD4X_COMMAND_SET_AUTOMATIC_SELF_CALIBRATION_ENABLED
Turns automatic self-calibration on or off.
PAMOJA_SCD4X_COMMAND_SET_SENSOR_ALTITUDE
Writes the altitude the part compensates its pressure for, in metres.
PAMOJA_SCD4X_COMMAND_SET_TEMPERATURE_OFFSET
Writes the temperature offset the part subtracts from its own reading.
PAMOJA_SCD4X_COMMAND_START_LOW_POWER_PERIODIC_MEASUREMENT
Starts low-power periodic measurements, one result every thirty seconds.
PAMOJA_SCD4X_COMMAND_START_PERIODIC_MEASUREMENT
Starts periodic measurements at one result every five seconds.
PAMOJA_SCD4X_COMMAND_STOP_PERIODIC_MEASUREMENT
Stops periodic measurements so other commands are accepted again.
PAMOJA_SCD4X_COMMAND_WAKE_UP
Brings an SCD41 back out of power-down.
PAMOJA_SCD4X_DEFAULT_TEMPERATURE_OFFSET_MILLI_CELSIUS
The temperature offset an SCD4x holds after a factory reset.
PAMOJA_SCD4X_FORCED_RECALIBRATION_FAILED
The word a forced recalibration returns when it did not take.
PAMOJA_SCD4X_I2C_ADDRESS
The single address an SCD4x answers on.
PAMOJA_SCD4X_LOW_POWER_PERIODIC_MEASUREMENT_INTERVAL_MS
How often it produces a result in low-power periodic mode, in milliseconds.
PAMOJA_SCD4X_MEASUREMENT_LEN
The number of bytes in an SCD4x measurement frame, three words with their CRCs.
PAMOJA_SCD4X_PERIODIC_MEASUREMENT_INTERVAL_MS
How often an SCD4x in periodic mode produces a result, in milliseconds.
PAMOJA_SCD4X_POWER_UP_TIME_MS
How long an SCD4x takes to become responsive after power-up, in milliseconds.
PAMOJA_SCD4X_WORD_LEN
The number of bytes in an SCD4x word frame: the word then its CRC.
PAMOJA_SCD4X_WRITE_LEN
The number of bytes in an SCD4x write frame: a command, a word, and its CRC.
PAMOJA_SHT3X_COMMAND_BREAK
Leaves periodic mode so another command can be accepted.
PAMOJA_SHT3X_COMMAND_CLEAR_STATUS
Clears the latched flags in the status register.
PAMOJA_SHT3X_COMMAND_FETCH_DATA
Fetches the last result of a periodic measurement.
PAMOJA_SHT3X_COMMAND_GENERAL_CALL_RESET
The general-call reset, addressed to 0x00.
PAMOJA_SHT3X_COMMAND_HEATER_DISABLE
Turns the on-die heater off.
PAMOJA_SHT3X_COMMAND_HEATER_ENABLE
Turns the on-die heater on.
PAMOJA_SHT3X_COMMAND_PERIODIC_ART
Accelerated response time: four measurements a second with a faster filter.
PAMOJA_SHT3X_COMMAND_PERIODIC_FOUR_MPS_HIGH
Four measurements a second at high repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_FOUR_MPS_LOW
Four measurements a second at low repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_FOUR_MPS_MEDIUM
Four measurements a second at medium repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_HALF_MPS_HIGH
A measurement every two seconds at high repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_HALF_MPS_LOW
A measurement every two seconds at low repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_HALF_MPS_MEDIUM
A measurement every two seconds at medium repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_ONE_MPS_HIGH
One measurement a second at high repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_ONE_MPS_LOW
One measurement a second at low repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_ONE_MPS_MEDIUM
One measurement a second at medium repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_TEN_MPS_HIGH
Ten measurements a second at high repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_TEN_MPS_LOW
Ten measurements a second at low repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_TEN_MPS_MEDIUM
Ten measurements a second at medium repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_TWO_MPS_HIGH
Two measurements a second at high repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_TWO_MPS_LOW
Two measurements a second at low repeatability.
PAMOJA_SHT3X_COMMAND_PERIODIC_TWO_MPS_MEDIUM
Two measurements a second at medium repeatability.
PAMOJA_SHT3X_COMMAND_READ_STATUS
Reads the status register.
PAMOJA_SHT3X_COMMAND_SINGLE_SHOT_HIGH
One high-repeatability measurement, released and fetched later.
PAMOJA_SHT3X_COMMAND_SINGLE_SHOT_HIGH_STRETCH
One high-repeatability measurement, holding the bus until it is ready.
PAMOJA_SHT3X_COMMAND_SINGLE_SHOT_LOW
One low-repeatability measurement, released and fetched later.
PAMOJA_SHT3X_COMMAND_SINGLE_SHOT_LOW_STRETCH
One low-repeatability measurement, holding the bus.
PAMOJA_SHT3X_COMMAND_SINGLE_SHOT_MEDIUM
One medium-repeatability measurement, released and fetched later.
PAMOJA_SHT3X_COMMAND_SINGLE_SHOT_MEDIUM_STRETCH
One medium-repeatability measurement, holding the bus.
PAMOJA_SHT3X_COMMAND_SOFT_RESET
Restarts the part as if it had been power-cycled.
PAMOJA_SHT3X_I2C_ADDRESS_A
The address an SHT3x answers on with its ADDR pin low.
PAMOJA_SHT3X_I2C_ADDRESS_B
The address it answers on with ADDR high.
PAMOJA_SHT3X_MEASUREMENT_LEN
The number of bytes in an SHT3x measurement frame, each word followed by its CRC.
PAMOJA_SHT3X_MIN_COMMAND_GAP_MICROS
The gap an SHT3x needs between two commands, in microseconds.
PAMOJA_SHT3X_STATUS_DEFAULT
The status word an SHT3x reads after a reset.
PAMOJA_SHT3X_WORD_LEN
The number of bytes in an SHT3x word frame: the word then its CRC.
PAMOJA_TMP117_ADDRESS_ADD0_GND
The address a TMP117 answers on with ADD0 tied to GND.
PAMOJA_TMP117_ADDRESS_ADD0_SCL
The address it answers on with ADD0 tied to SCL.
PAMOJA_TMP117_ADDRESS_ADD0_SDA
The address it answers on with ADD0 tied to SDA.
PAMOJA_TMP117_ADDRESS_ADD0_VPLUS
The address it answers on with ADD0 tied to V+.
PAMOJA_TMP117_CONFIG_RESET
The value its configuration register reads after a reset.
PAMOJA_TMP117_DEVICE_ID
The value a TMP117’s device-ID register reads, which confirms the part.
PAMOJA_TMP117_EEPROM_UNLOCK
The word written to the EEPROM unlock register to allow a write.
PAMOJA_TMP117_GENERAL_CALL_RESET
The byte a general-call reset sends to address 0x00.
PAMOJA_TMP117_HIGH_LIMIT_RESET
The value its high-limit register reads after a reset.
PAMOJA_TMP117_LOW_LIMIT_RESET
The value its low-limit register reads after a reset.
PAMOJA_TMP117_REGISTER_CONFIGURATION
The TMP117 configuration register.
PAMOJA_TMP117_REGISTER_DEVICE_ID
The TMP117 device-ID register.
PAMOJA_TMP117_REGISTER_EEPROM1
The first TMP117 general-purpose EEPROM register.
PAMOJA_TMP117_REGISTER_EEPROM2
The second TMP117 general-purpose EEPROM register.
PAMOJA_TMP117_REGISTER_EEPROM3
The third TMP117 general-purpose EEPROM register.
PAMOJA_TMP117_REGISTER_EEPROM_UL
The TMP117 EEPROM unlock register.
PAMOJA_TMP117_REGISTER_LEN
The number of bytes in a TMP117 register read.
PAMOJA_TMP117_REGISTER_TEMP_OFFSET
The TMP117 temperature offset register.
PAMOJA_TMP117_REGISTER_TEMP_RESULT
The TMP117 temperature result register.
PAMOJA_TMP117_REGISTER_THIGH_LIMIT
The TMP117 high-limit register.
PAMOJA_TMP117_REGISTER_TLOW_LIMIT
The TMP117 low-limit register.
PAMOJA_TMP117_TEMP_RESULT_RESET
The value its result register reads before the first conversion completes.

Functions§

pamoja_ads1115_config_bits
Assembles the 16-bit ADS1115 configuration register value.
pamoja_ads1115_config_from_bits
Parses a 16-bit ADS1115 configuration register value.
pamoja_ads1115_full_scale_microvolts
Returns the full-scale range an ADS1115 gain code selects.
pamoja_ads1115_samples_per_second
Returns the sample rate an ADS1115 data-rate code selects.
pamoja_ads1115_to_nanovolts
Converts a raw ADS1115 conversion result to nanovolts.
pamoja_ads1115_to_volts
Converts a raw ADS1115 conversion result to volts.
pamoja_bme280_calibration_free
Releases a BME280 calibration handle.
pamoja_bme280_calibration_new
Builds a BME280 calibration from the bytes read out of its registers.
pamoja_bme280_compensate
Turns a BME280 burst read into a compensated reading.
pamoja_bmp280_calibration_coefficients
Reads out the trimming coefficients a BMP280 calibration carries.
pamoja_bmp280_calibration_free
Releases a BMP280 calibration handle.
pamoja_bmp280_calibration_new
Builds a BMP280 calibration from the 24 bytes read out of its registers.
pamoja_bmp280_calibration_to_bytes
Rebuilds the 24 calibration bytes a device holding these coefficients returns.
pamoja_bmp280_compensate
Turns a BMP280 burst read into a compensated reading.
pamoja_bmp280_config_bits
Assembles a BMP280 config register value.
pamoja_bmp280_config_from_bits
Parses a BMP280 config register value.
pamoja_bmp280_ctrl_meas_bits
Assembles a BMP280 ctrl_meas register value.
pamoja_bmp280_ctrl_meas_from_bits
Parses a BMP280 ctrl_meas register value.
pamoja_bmp280_image_updating
Reports whether a BMP280 status byte says the calibration image is loading.
pamoja_bmp280_measurement_bytes
Builds the six data bytes a BMP280 holding these codes would return.
pamoja_bmp280_measuring
Reports whether a BMP280 status byte says a conversion is running.
pamoja_bmp280_oversampling_factor
Returns how many samples a BMP280 oversampling code averages.
pamoja_bmp280_parse_measurement
Unpacks the six data bytes a BMP280 burst read returns.
pamoja_bmp280_standby_micros
Returns the normal-mode standby period a BMP280 code selects.
pamoja_ds18b20_build_scratchpad
Builds the nine bytes a DS18B20 in the given state puts on the bus, CRC last.
pamoja_ds18b20_celsius
Converts a raw DS18B20 temperature register to degrees Celsius.
pamoja_ds18b20_config_byte
Returns the configuration byte that selects a DS18B20 resolution.
pamoja_ds18b20_crc8
Computes the Maxim CRC-8 a 1-Wire device checks its own bytes with.
pamoja_ds18b20_max_conversion_micros
Returns how long a DS18B20 conversion may take at a resolution.
pamoja_ds18b20_micro_celsius
Converts a raw DS18B20 temperature register to micro-degrees Celsius.
pamoja_ds18b20_parse_scratchpad
Parses and CRC-checks a nine-byte DS18B20 scratchpad.
pamoja_ds18b20_resolution_bits
Returns the resolution a DS18B20 configuration byte selects.
pamoja_ds18b20_step_micro_celsius
Returns the temperature step a DS18B20 resolution resolves.
pamoja_hdc1080_celsius
Converts a raw HDC1080 temperature register to degrees Celsius.
pamoja_hdc1080_config_from_register
Parses an HDC1080 configuration register value.
pamoja_hdc1080_config_to_register
Assembles an HDC1080 configuration register value.
pamoja_hdc1080_conversion_time_micros
Returns how long to wait after triggering an HDC1080 in a configuration.
pamoja_hdc1080_humidity_conversion_micros
Returns how long an HDC1080 humidity conversion takes at a resolution.
pamoja_hdc1080_humidity_register
Builds the HDC1080 humidity register that decodes to a relative humidity.
pamoja_hdc1080_measurement_bytes
Builds the four bytes an HDC1080 sends for a pair of raw registers.
pamoja_hdc1080_measurement_from_physical
Builds the HDC1080 measurement a sensor reporting these physical values would send.
pamoja_hdc1080_milli_celsius
Converts a raw HDC1080 temperature register to milli-degrees Celsius.
pamoja_hdc1080_milli_percent
Converts a raw HDC1080 humidity register to milli-percent.
pamoja_hdc1080_parse_measurement
Parses the four bytes an HDC1080 sequential read returns.
pamoja_hdc1080_relative_humidity
Converts a raw HDC1080 humidity register to a relative humidity percentage.
pamoja_hdc1080_serial_id
Joins the three HDC1080 serial-ID registers into the 40-bit serial number.
pamoja_hdc1080_serial_id_registers
Splits a serial number back into the three HDC1080 serial-ID registers.
pamoja_hdc1080_temperature_conversion_micros
Returns how long an HDC1080 temperature conversion takes at a resolution.
pamoja_hdc1080_temperature_register
Builds the HDC1080 temperature register that decodes to a temperature.
pamoja_ina219_bus_millivolts
Converts a raw INA219 bus-voltage register to millivolts.
pamoja_ina219_bus_register
Builds the INA219 bus-voltage register a monitor reports for a bus voltage.
pamoja_ina219_calibration
Computes the INA219 calibration register for a shunt and current resolution.
pamoja_ina219_conversion_ready
Reports whether an INA219 bus-voltage register says a conversion is ready.
pamoja_ina219_current_microamps
Converts a raw INA219 current register to microamps.
pamoja_ina219_current_register
Builds the INA219 current register a monitor reports for a current.
pamoja_ina219_math_overflow
Reports whether an INA219 bus-voltage register flags a math overflow.
pamoja_ina219_minimum_current_lsb_microamps
Returns the smallest current resolution that still covers an expected maximum.
pamoja_ina219_power_microwatts
Converts a raw INA219 power register to microwatts.
pamoja_ina219_power_register
Builds the INA219 power register a monitor reports for a power.
pamoja_ina219_shunt_microvolts
Converts a raw INA219 shunt-voltage register to microvolts.
pamoja_ina219_shunt_register
Builds the INA219 shunt-voltage register a monitor reports for a shunt voltage.
pamoja_ina226_active_alert_function
Returns the alert function an INA226 pin actually responds to.
pamoja_ina226_address
Returns the I2C address an INA226’s A1 and A0 pin codes select.
pamoja_ina226_averaging_samples
Returns how many samples an INA226 averaging code folds into one result.
pamoja_ina226_bus_microvolts
Converts a raw INA226 bus-voltage register to microvolts.
pamoja_ina226_bus_register
Builds the INA226 bus-voltage register a monitor reports for a bus voltage.
pamoja_ina226_bus_volts
Converts a raw INA226 bus-voltage register to volts.
pamoja_ina226_calibration
Computes the INA226 calibration register for a shunt and current resolution.
pamoja_ina226_config_from_register
Parses an INA226 configuration register value.
pamoja_ina226_config_to_register
Assembles an INA226 configuration register value.
pamoja_ina226_conversion_micros
Returns the conversion time an INA226 code selects.
pamoja_ina226_current_amps
Converts a raw INA226 current register to amps.
pamoja_ina226_current_microamps
Converts a raw INA226 current register to microamps.
pamoja_ina226_current_register
Builds the INA226 current register a monitor reports for a current.
pamoja_ina226_current_register_from_shunt
Computes the INA226 current register the chip derives from a shunt reading.
pamoja_ina226_die_id
Splits an INA226 die-ID register into its device and revision fields.
pamoja_ina226_identify
Checks that a pair of identification registers belongs to an INA226.
pamoja_ina226_is_continuous
Reports whether an INA226 mode code keeps converting after the first result.
pamoja_ina226_mask_enable_from_register
Parses an INA226 Mask/Enable register value.
pamoja_ina226_mask_enable_to_register
Assembles an INA226 Mask/Enable register value.
pamoja_ina226_measures_bus
Reports whether an INA226 mode code converts the bus voltage.
pamoja_ina226_measures_shunt
Reports whether an INA226 mode code converts the shunt voltage.
pamoja_ina226_minimum_current_lsb_microamps
Returns the smallest current resolution that still covers an expected maximum.
pamoja_ina226_power_microwatts
Converts a raw INA226 power register to microwatts.
pamoja_ina226_power_register
Builds the INA226 power register a monitor reports for a power.
pamoja_ina226_power_register_from_current
Computes the INA226 power register the chip derives from a current reading.
pamoja_ina226_power_watts
Converts a raw INA226 power register to watts.
pamoja_ina226_shunt_millivolts
Converts a raw INA226 shunt-voltage register to millivolts.
pamoja_ina226_shunt_nanovolts
Converts a raw INA226 shunt-voltage register to nanovolts.
pamoja_ina226_shunt_register
Builds the INA226 shunt-voltage register a monitor reports for a shunt voltage.
pamoja_ina226_update_micros
Returns how often an INA226 in a configuration updates its results.
pamoja_opt3001_config_bits
Assembles the 16-bit OPT3001 configuration register value.
pamoja_opt3001_config_from_bits
Parses a 16-bit OPT3001 configuration register value.
pamoja_opt3001_conversion_millis
Returns the conversion time an OPT3001 setting selects.
pamoja_opt3001_fault_count
Returns how many consecutive faults an OPT3001 fault-count code requires.
pamoja_opt3001_full_scale_milli_lux
Returns the full scale an OPT3001 range number covers.
pamoja_opt3001_is_automatic_range
Reports whether an OPT3001 range number sets the full scale automatically.
pamoja_opt3001_lsb_milli_lux
Returns the illuminance one count carries at an OPT3001 exponent.
pamoja_opt3001_lux
Converts a raw OPT3001 result register to lux.
pamoja_opt3001_milli_lux
Converts a raw OPT3001 result register to milli-lux.
pamoja_opt3001_raw_from_milli_lux
Builds the OPT3001 result register that decodes to an illuminance.
pamoja_opt3001_word_from_bytes
Reads the two bytes an OPT3001 sends for a register, most significant first.
pamoja_opt3001_word_to_bytes
Builds the two bytes an OPT3001 sends for a register, most significant first.
pamoja_scd4x_allowed_during_measurement
Reports whether an SCD4x accepts a command while it is measuring.
pamoja_scd4x_ambient_pressure_pascals
Reads an SCD4x ambient-pressure word back as a pressure.
pamoja_scd4x_ambient_pressure_word
Builds the SCD4x ambient-pressure word for a pressure.
pamoja_scd4x_automatic_self_calibration_enabled
Reports whether an SCD4x word says automatic self-calibration is on.
pamoja_scd4x_automatic_self_calibration_word
Builds the SCD4x word that turns automatic self-calibration on or off.
pamoja_scd4x_celsius
Converts a raw SCD4x temperature word to degrees Celsius.
pamoja_scd4x_command_frame
Builds the two bytes that address an SCD4x command, most significant first.
pamoja_scd4x_crc
Computes the CRC-8 an SCD4x appends to every data word.
pamoja_scd4x_data_ready
Reports whether an SCD4x data-ready word says a fresh result is waiting.
pamoja_scd4x_forced_recalibration_correction_ppm
Reads the correction a forced recalibration applied.
pamoja_scd4x_forced_recalibration_word
Builds the word an SCD4x returns for a forced-recalibration outcome.
pamoja_scd4x_humidity_milli_percent
Converts a raw SCD4x humidity word to milli-percent.
pamoja_scd4x_humidity_raw
Builds the SCD4x humidity word that decodes to a relative humidity.
pamoja_scd4x_max_duration_ms
Returns how long an SCD4x command may take before its result can be read.
pamoja_scd4x_measurement_bytes
Builds the nine bytes an SCD4x sends for a set of raw words, each CRC included.
pamoja_scd4x_measurement_from_physical
Builds the SCD4x measurement a sensor reporting these physical values would send.
pamoja_scd4x_milli_celsius
Converts a raw SCD4x temperature word to milli-degrees Celsius.
pamoja_scd4x_parse_measurement
Parses and CRC-checks a nine-byte SCD4x measurement frame.
pamoja_scd4x_relative_humidity_percent
Converts a raw SCD4x humidity word to a relative humidity percentage.
pamoja_scd4x_self_test_passed
Reports whether an SCD4x self-test word says the part is healthy.
pamoja_scd4x_serial_number
Reads the 48-bit serial number out of a nine-byte SCD4x frame.
pamoja_scd4x_serial_number_frame
Builds the nine bytes an SCD4x sends for a serial number, each CRC included.
pamoja_scd4x_temperature_offset_milli_celsius
Reads an SCD4x temperature-offset word back as an offset.
pamoja_scd4x_temperature_offset_word
Builds the SCD4x temperature-offset word for an offset.
pamoja_scd4x_temperature_raw
Builds the SCD4x temperature word that decodes to a temperature.
pamoja_scd4x_word
Reads a CRC-checked three-byte SCD4x word frame.
pamoja_scd4x_word_frame
Builds the three bytes an SCD4x sends for a word: the word then its CRC.
pamoja_scd4x_write_frame
Builds the five bytes that write a word to an SCD4x: command, word, CRC.
pamoja_sht3x_celsius
Converts a raw SHT3x temperature word to degrees Celsius.
pamoja_sht3x_crc
Computes the CRC-8 an SHT3x appends to every data word.
pamoja_sht3x_fahrenheit
Converts a raw SHT3x temperature word to degrees Fahrenheit.
pamoja_sht3x_humidity_raw_from_milli_percent
Builds the SHT3x humidity word that decodes to a relative humidity.
pamoja_sht3x_humidity_raw_from_relative_humidity
Builds the SHT3x humidity word that decodes to a relative humidity percentage.
pamoja_sht3x_interval_micros
Returns the gap between SHT3x periodic measurements at a rate.
pamoja_sht3x_max_measurement_micros
Returns how long an SHT3x measurement may take at a repeatability.
pamoja_sht3x_measurement_bytes
Builds the six bytes an SHT3x sends for a pair of raw words.
pamoja_sht3x_milli_celsius
Converts a raw SHT3x temperature word to milli-degrees Celsius.
pamoja_sht3x_milli_fahrenheit
Converts a raw SHT3x temperature word to milli-degrees Fahrenheit.
pamoja_sht3x_milli_percent
Converts a raw SHT3x humidity word to milli-percent.
pamoja_sht3x_parse_measurement
Parses and CRC-checks a six-byte SHT3x measurement frame.
pamoja_sht3x_parse_status
Parses and CRC-checks a three-byte SHT3x status frame.
pamoja_sht3x_periodic
Returns the SHT3x periodic-mode command for a repeatability and rate.
pamoja_sht3x_relative_humidity
Converts a raw SHT3x humidity word to a relative humidity percentage.
pamoja_sht3x_single_shot
Returns the SHT3x single-shot command for a repeatability and clock mode.
pamoja_sht3x_status_bytes
Builds the three bytes an SHT3x sends for a status word, CRC last.
pamoja_sht3x_status_from_bits
Splits an SHT3x status word into its flags.
pamoja_sht3x_temperature_raw_from_celsius
Builds the SHT3x temperature word that decodes to a temperature in Celsius.
pamoja_sht3x_temperature_raw_from_milli_celsius
Builds the SHT3x temperature word that decodes to a temperature.
pamoja_sht3x_temperature_raw_from_milli_fahrenheit
Builds the SHT3x temperature word that decodes to a temperature in Fahrenheit.
pamoja_sht3x_typical_measurement_micros
Returns how long an SHT3x measurement typically takes at a repeatability.
pamoja_sht3x_word
Reads a CRC-checked three-byte SHT3x word frame.
pamoja_sht3x_word_bytes
Builds the three bytes an SHT3x sends for a word: the word then its CRC.
pamoja_tmp117_averaging_conversions
Returns how many conversions a TMP117 averaging code folds into one result.
pamoja_tmp117_averaging_micros
Returns how long a TMP117 averaging code takes to convert.
pamoja_tmp117_celsius
Converts a raw TMP117 temperature register to degrees Celsius.
pamoja_tmp117_config_bits
Assembles the 16-bit TMP117 configuration register value.
pamoja_tmp117_config_from_bits
Parses a 16-bit TMP117 configuration register value.
pamoja_tmp117_cycle_micros
Returns how often a TMP117 updates its result for a cycle and averaging code.
pamoja_tmp117_cycle_nominal_micros
Returns the nominal cycle a TMP117 conversion-cycle code selects.
pamoja_tmp117_data_ready
Reports whether a TMP117 configuration register says a result is ready.
pamoja_tmp117_device_id
Reads the device identifier out of a TMP117 device-ID register.
pamoja_tmp117_eeprom_busy
Reports whether a TMP117 configuration register says an EEPROM write is running.
pamoja_tmp117_eeprom_unlock_busy
Reports whether a TMP117 EEPROM unlock register says a write is running.
pamoja_tmp117_high_alert
Reports whether a TMP117 configuration register flags a high alert.
pamoja_tmp117_low_alert
Reports whether a TMP117 configuration register flags a low alert.
pamoja_tmp117_micro_celsius
Converts a raw TMP117 temperature register to micro-degrees Celsius.
pamoja_tmp117_nano_celsius
Converts a raw TMP117 temperature register to nano-degrees Celsius.
pamoja_tmp117_raw_from_celsius
Builds the TMP117 temperature register that decodes to a temperature in Celsius.
pamoja_tmp117_raw_from_micro_celsius
Builds the TMP117 temperature register that decodes to a temperature.
pamoja_tmp117_revision
Reads the die revision out of a TMP117 device-ID register.
pamoja_tmp117_temperature_bytes
Builds the two bytes a TMP117 sends for a temperature register.
pamoja_tmp117_temperature_from_bytes
Reads the two bytes a TMP117 sends for a temperature register.