version constraints for PL I2C reset pin
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...

This commit is contained in:
Robin Müller 2023-06-26 17:29:53 +02:00
parent 52f5b088bf
commit 72ffa365d4
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -1030,16 +1030,18 @@ void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
using namespace gpio;
if (gpioIF == nullptr) {
return;
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
if (gpioIF == nullptr) {
return;
}
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
// Reset I2C explicitely again.
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
TaskFactory::delayTask(1);
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
}
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
// Reset I2C explicitely again.
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
TaskFactory::delayTask(1);
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
}