version constraints for PL I2C reset pin
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
This commit is contained in:
parent
52f5b088bf
commit
72ffa365d4
@ -1030,16 +1030,18 @@ void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
|
|||||||
|
|
||||||
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
if (gpioIF == nullptr) {
|
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||||
return;
|
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);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user