adding uart isolator switches wip
This commit is contained in:
@ -5,10 +5,17 @@
|
||||
#include "fsfw/globalfunctions/CRC.h"
|
||||
|
||||
PlocMPSoCHandler::PlocMPSoCHandler(object_id_t objectId, object_id_t uartComIFid,
|
||||
CookieIF* comCookie, PlocMPSoCHelper* plocMPSoCHelper)
|
||||
: DeviceHandlerBase(objectId, uartComIFid, comCookie), plocMPSoCHelper(plocMPSoCHelper) {
|
||||
if (comCookie == NULL) {
|
||||
sif::error << "PlocMPSoCHandler: Invalid com cookie" << std::endl;
|
||||
CookieIF* comCookie, PlocMPSoCHelper* plocMPSoCHelper,
|
||||
LinuxLibgpioIF* gpioComIF, gpioId_t 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);
|
||||
}
|
||||
@ -118,9 +125,13 @@ void PlocMPSoCHandler::doStartUp() {
|
||||
#else
|
||||
setMode(_MODE_TO_ON);
|
||||
#endif
|
||||
gpioComIF->pullHigh(uartIsolatorSwitch);
|
||||
}
|
||||
|
||||
void PlocMPSoCHandler::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||
void PlocMPSoCHandler::doShutDown() {
|
||||
gpioComIF->pullLow(uartIsolatorSwitch);
|
||||
setMode(_MODE_POWER_DOWN);
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||
return NOTHING_TO_SEND;
|
||||
|
Reference in New Issue
Block a user