32#ifndef SFM_FLOW_METER_I2C_INTERFACE_HPP
33#define SFM_FLOW_METER_I2C_INTERFACE_HPP
85template <
typename Derived>
112template <typename Port>
114 detail::ExactHook<Port, bool()
noexcept>::Take(&Port::EnsureInitialized);
115 detail::ExactHook<Port, bool(uint8_t,
const uint8_t*, std::size_t)
noexcept>::Take(&Port::Write);
116 detail::ExactHook<Port, bool(uint8_t, uint8_t*, std::size_t)
noexcept>::Take(&Port::Read);
CRTP base of the platform I2C port.
Definition sfm_flow_meter_i2c_interface.hpp:86
I2cInterface(const I2cInterface &)=delete
Ports are not copied: the driver holds a reference.
I2cInterface & operator=(const I2cInterface &)=delete
Ports are not copied: the driver holds a reference.
I2cInterface() noexcept=default
Only the derived port is constructed.
Satisfied by a class that derives from I2cInterface<Port> and implements the required hooks with exac...
Definition sfm_flow_meter_i2c_interface.hpp:113
The SFM flow meter driver: everything it declares lives here; internals in detail.
Definition sfm_flow_meter.hpp:35
constexpr std::size_t kMaxWrite
Definition sfm_flow_meter_i2c_interface.hpp:71
constexpr uint32_t kSafeClockHz
Definition sfm_flow_meter_i2c_interface.hpp:62
constexpr std::size_t kMaxRead
Definition sfm_flow_meter_i2c_interface.hpp:68
constexpr uint32_t kMaxClockHz
Definition sfm_flow_meter_i2c_interface.hpp:57
constexpr bool kRepeatedStart
Definition sfm_flow_meter_i2c_interface.hpp:65
constexpr uint8_t kI2cAddress
Definition sfm_flow_meter_i2c_interface.hpp:54
constexpr uint32_t kTypClockHz
Typical SCL frequency of the SF06 family.
Definition sfm_flow_meter_i2c_interface.hpp:59
Compile-time helpers of the SFM_FLOW_METER driver: typed integer literals, exact hook matching,...
Public types of the SFM flow meter driver: errors, Result<T>, the families, variants and gases,...