From 06fe113d7f91f63f57fb0ccb2bcbba02ab9b8717 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 7 Jul 2023 15:33:48 +0200 Subject: [PATCH] that should be sufficient --- bsp_q7s/boardconfig/busConf.h | 3 +++ bsp_q7s/em/emObjectFactory.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index 146386c4..dc3779a7 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -12,6 +12,9 @@ static constexpr char SPI_RW_DEV[] = "/dev/spi_rw"; static constexpr char I2C_PL_EIVE[] = "/dev/i2c_pl"; //! I2C bus using the I2C peripheral of the ARM processing system (PS) static constexpr char I2C_PS_EIVE[] = "/dev/i2c_ps"; +//! I2C bus using the first I2C peripheral of the ARM processing system (PS). +//! Named like this because it is used by default for the Q7 devices. +static constexpr char I2C_Q7_EIVE[] = "/dev/i2c_q7"; static constexpr char UART_GNSS_DEV[] = "/dev/gps0"; static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul_plmpsoc"; diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 085d5184..58b9a7f9 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -69,8 +69,10 @@ void ObjectFactory::produce(void* args) { {objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD}, }}; const char* tmpI2cDev = q7s::I2C_PS_EIVE; - if (core::FW_VERSION_MAJOR >= 4) { + if (core::FW_VERSION_MAJOR == 4) { tmpI2cDev = q7s::I2C_PL_EIVE; + } else if(core::FW_VERSION_MAJOR >= 5) { + tmpI2cDev = q7s::I2C_Q7_EIVE; } createTmpComponents(tmpDevsToAdd, tmpI2cDev); dummy::Tmp1075Cfg tmpCfg{};