|
SFM Flow Meter Driver 1.0.0
API reference
|
CRTP byte transport for Sensirion SF06-family flow meters (SFM4300, …). More...
#include <cstddef>#include <cstdint>#include <type_traits>Go to the source code of this file.
Classes | |
| class | sfm::I2cInterface< Derived > |
| CRTP base for the SF06 I2C transport. More... | |
Namespaces | |
| namespace | sfm |
CRTP byte transport for Sensirion SF06-family flow meters (SFM4300, …).
The driver only moves bytes. Sensirion SF06 devices do not use a register-address model: a transaction is either a raw write of a 16-bit command (plus optional 16-bit argument + CRC) or a raw read of N words, each followed by a CRC-8 byte. The platform adapter therefore implements:
bool Write(uint8_t addr7, const uint8_t* data, std::size_t len);bool Read(uint8_t addr7, uint8_t* out, std::size_t len);void DelayMs(uint32_t ms);bool EnsureInitialized();Optional (default returns false = not supported):
bool WriteGeneralCall(uint8_t byte); — write one byte to the I2C general-call address 0x00 (used by Driver::SoftReset).Reads return false on NACK. The SF06 sensors NACK a read header while no fresh measurement is available (data sheet §4.3.1); the driver reports that as DriverError::NoData.