diff --git a/components/ocs_sensor/sht4x/sensor_pipeline.cpp b/components/ocs_sensor/sht4x/sensor_pipeline.cpp index 561f9a72..5b972c81 100644 --- a/components/ocs_sensor/sht4x/sensor_pipeline.cpp +++ b/components/ocs_sensor/sht4x/sensor_pipeline.cpp @@ -23,7 +23,7 @@ SensorPipeline::SensorPipeline(io::i2c::IStore& store, configASSERT(storage_); transceiver_ = store.add(transceiver_id_.c_str(), io::i2c::AddressLength::Bit_7, - params.i2c_addr, io::i2c::TransferSpeed::Fast); + params.i2c_addr, params.i2c_speed); configASSERT(transceiver_); sensor_.reset(new (std::nothrow) Sensor(*transceiver_, *storage_, id, params.sensor)); diff --git a/components/ocs_sensor/sht4x/sensor_pipeline.h b/components/ocs_sensor/sht4x/sensor_pipeline.h index 177930ed..ff18494d 100644 --- a/components/ocs_sensor/sht4x/sensor_pipeline.h +++ b/components/ocs_sensor/sht4x/sensor_pipeline.h @@ -24,7 +24,10 @@ class SensorPipeline : private core::NonCopyable<> { //! Various pipeline settings. struct Params { //! Sensor I2C address. - uint8_t i2c_addr { 0x44 }; + io::i2c::Address i2c_addr { 0x44 }; + + //! Transfer speed for I2C communication. + io::i2c::TransferSpeed i2c_speed { io::i2c::TransferSpeed::Fast }; //! How often to read data from the sensor. system::Time read_interval { 0 };