|
SFM_FLOW_METER Driver 0.1.0
API reference
|
Command codes and field helpers. More...
Typedefs | |
| using | StatusCommand = detail::Field< uint16_t, 12U, 4U > |
| using | StatusSmoothing = detail::Field< uint16_t, 11U, 1U > |
| Status word, bit 11: exponential smoothing is active (SF06 and SFM3304). | |
| using | StatusFixedN = detail::Field< uint16_t, 10U, 1U > |
| Status word, bit 10: fixed-N averaging is active (SF06 and SFM3304). | |
| using | StatusConcentration = detail::Field< uint16_t, 0U, 10U > |
| using | StatusFilterArg = detail::Field< uint16_t, 9U, 1U > |
| SFM3304 status word, bit 9: a filter argument was received. | |
| using | StatusAverages = detail::Field< uint16_t, 0U, 9U > |
| SFM3304 status word, bits 8:0: the configured number of averages. | |
Functions | |
| constexpr uint8_t | Crc8 (uint8_t init, uint8_t high, uint8_t low) noexcept |
| CRC-8 of one 16-bit word as the chip computes it: polynomial 0x31 (x^8. | |
| constexpr bool | CrcVectorsHold () noexcept |
| The CRC vectors of the datasheets, proved at build time (see the static_assert below). | |
Variables | |
| constexpr uint16_t | kCmdStartGas0 = 0x3603 |
| Start continuous measurement, gas 0. | |
| constexpr uint16_t | kCmdStartGas1 = 0x3608 |
| Start continuous measurement, gas 1. | |
| constexpr uint16_t | kCmdStartGas2 = 0x3615 |
| Start continuous measurement, gas 2. | |
| constexpr uint16_t | kCmdStartGas3 = 0x361E |
| Start continuous measurement, gas 3. | |
| constexpr uint16_t | kCmdStartGas4 |
| Start, gas 4 (SFx6000 argon; reserved on SF06). | |
| constexpr uint16_t | kCmdStartMixture0 |
| Start, mixture 0 (argument: O2 in per mille). | |
| constexpr uint16_t | kCmdStartMixture1 = 0x3639 |
| Start, mixture 1. | |
| constexpr uint16_t | kCmdStartMixture2 = 0x3646 |
| Start, mixture 2. | |
| constexpr uint16_t | kCmdStartSfxMixture0 = 0x3650 |
| SFx6000: start, mixture 0. | |
| constexpr uint16_t | kCmdUpdateConcentration |
| Update concentration, part 1 (argument). | |
| constexpr uint16_t | kCmdResultPointer = 0xE000 |
| Point the read at the result buffer. | |
| constexpr uint16_t | kCmdStop = 0x3FF9 |
| Stop continuous measurement. | |
| constexpr uint16_t | kCmdAveraging = 0x366A |
| SF06 and SFM3304: configure averaging. | |
| constexpr uint16_t | kCmdAveragingDual = 0x364D |
| SFM3505: configure averaging. | |
| constexpr uint16_t | kCmdReadScale |
| Read scale factor, offset and unit (argument). | |
| constexpr uint16_t | kCmdSleep = 0x3677 |
| Enter sleep mode. | |
| constexpr uint16_t | kCmdProductId = 0xE102 |
| Read the product identifier (idle). | |
| constexpr uint16_t | kCmdDeviceIdDual = 0x365B |
| SFM3505: read the device identifier. | |
| constexpr uint16_t | kCmdSfxScalePointer |
| SFx6000: point the read at the gas information. | |
| constexpr uint16_t | kCmdSfxTemperature |
| SFx6000: point the read at the temperature. | |
| constexpr uint8_t | kGeneralCallReset = 0x06 |
| Byte sent to address 0x00 to reset. | |
| constexpr uint8_t | kGeneralCallAddress = 0x00 |
| The I2C general-call address. | |
| constexpr uint16_t | kSf05Flow = 0x1000 |
| Start flow measurement / point at the flow. | |
| constexpr uint16_t | kSf05Temperature = 0x1001 |
| Point at the temperature. | |
| constexpr uint16_t | kSf05Reset = 0x2000 |
| Soft reset (SFM3x00). | |
| constexpr uint16_t | kSf05ScaleFlow = 0x30DE |
| Flow scale factor. | |
| constexpr uint16_t | kSf05OffsetFlow = 0x30DF |
| Flow offset. | |
| constexpr uint16_t | kSf05Serial = 0x31AE |
| constexpr uint16_t | kSf05SerialLow = 0x31AF |
| Serial number, least significant word. | |
| constexpr uint8_t | kSf04TriggerFlow = 0xF1 |
| Trigger a flow measurement. | |
| constexpr uint8_t | kSf04TriggerTemperature = 0xF3 |
| Trigger a temperature measurement. | |
| constexpr uint8_t | kSf04SoftReset = 0xFE |
| Soft reset. | |
| constexpr uint8_t | kSf04UserRegister = 0xE3 |
| Read the user register. | |
| constexpr uint8_t | kSf04ReadOnly2 = 0xE9 |
| Read read-only register 2. | |
| constexpr uint8_t | kSf04Eeprom = 0xFA |
| Read the EEPROM. | |
| constexpr uint16_t | kSf04EepromSerial |
| EEPROM address of the product serial number. | |
| constexpr uint16_t | kSf04EepromScale = 0x02B6 |
| EEPROM address of the scale factor. | |
| constexpr uint16_t | kSf04EepromUnit = 0x02B7 |
| EEPROM address of the flow-unit word. | |
| constexpr uint16_t | kSf04FieldStride = 0x0300 |
| EEPROM size of one calibration field. | |
| constexpr uint16_t | kUnitSlm = 0x0148 |
| constexpr uint16_t | kUnitSccm = 0x0145 |
| constexpr uint16_t | kStatusPureGas = 0x3FF |
| Status bits 9:0 of a pure gas. | |
Command codes and field helpers.