uart isolator switch handling
This commit is contained in:
@ -6,17 +6,13 @@
|
||||
|
||||
PlocMPSoCHandler::PlocMPSoCHandler(object_id_t objectId, object_id_t uartComIFid,
|
||||
CookieIF* comCookie, PlocMPSoCHelper* plocMPSoCHelper,
|
||||
LinuxLibgpioIF* gpioComIF, gpioId_t uartIsolatorSwitch)
|
||||
Gpio uartIsolatorSwitch)
|
||||
: DeviceHandlerBase(objectId, uartComIFid, comCookie),
|
||||
plocMPSoCHelper(plocMPSoCHelper),
|
||||
gpioComIF(gpioComIF),
|
||||
uartIsolatorSwitch(uartIsolatorSwitch) {
|
||||
if (comCookie == nullptr) {
|
||||
sif::error << "PlocMPSoCHandler: Invalid communication cookie" << std::endl;
|
||||
}
|
||||
if (gpioComIF == nullptr) {
|
||||
sif::error << "PlocMPSoCHandler: Invalid gpio communication interface" << std::endl;
|
||||
}
|
||||
eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
||||
}
|
||||
|
||||
@ -125,11 +121,11 @@ void PlocMPSoCHandler::doStartUp() {
|
||||
#else
|
||||
setMode(_MODE_TO_ON);
|
||||
#endif
|
||||
gpioComIF->pullHigh(uartIsolatorSwitch);
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
}
|
||||
|
||||
void PlocMPSoCHandler::doShutDown() {
|
||||
gpioComIF->pullLow(uartIsolatorSwitch);
|
||||
uartIsolatorSwitch.pullLow();
|
||||
setMode(_MODE_POWER_DOWN);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user