added doSendReadHook to prevent com if polling when com if is used by helper task
This commit is contained in:
parent
be752997eb
commit
49b0825f63
@ -830,6 +830,14 @@ size_t PlocMPSoCHandler::getNextReplyLength(DeviceCommandId_t commandId) {
|
|||||||
return replyLen;
|
return replyLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMPSoCHandler::doSendReadHook() {
|
||||||
|
// Prevent DHB from polling UART during commands executed by the mpsoc helper task
|
||||||
|
if (plocMPSoCHelperExecuting) {
|
||||||
|
return RETURN_FAILED;
|
||||||
|
}
|
||||||
|
return RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
MessageQueueIF* PlocMPSoCHandler::getCommandQueuePtr() { return commandActionHelperQueue; }
|
MessageQueueIF* PlocMPSoCHandler::getCommandQueuePtr() { return commandActionHelperQueue; }
|
||||||
|
|
||||||
void PlocMPSoCHandler::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) { return; }
|
void PlocMPSoCHandler::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) { return; }
|
||||||
@ -840,12 +848,13 @@ void PlocMPSoCHandler::stepFailedReceived(ActionId_t actionId, uint8_t step,
|
|||||||
case supv::START_MPSOC:
|
case supv::START_MPSOC:
|
||||||
sif::warning << "PlocMPSoCHandler::stepFailedReceived: Failed to start MPSoC" << std::endl;
|
sif::warning << "PlocMPSoCHandler::stepFailedReceived: Failed to start MPSoC" << std::endl;
|
||||||
powerState = PowerState::OFF;
|
powerState = PowerState::OFF;
|
||||||
|
setMode(_MODE_SHUT_DOWN);
|
||||||
break;
|
break;
|
||||||
case supv::SHUTDOWN_MPSOC:
|
case supv::SHUTDOWN_MPSOC:
|
||||||
triggerEvent(MPSOC_SHUTDOWN_FAILED);
|
triggerEvent(MPSOC_SHUTDOWN_FAILED);
|
||||||
sif::warning << "PlocMPSoCHandler::stepFailedReceived: Failed to shutdown MPSoC" << std::endl;
|
sif::warning << "PlocMPSoCHandler::stepFailedReceived: Failed to shutdown MPSoC" << std::endl;
|
||||||
// TODO: Setting state to on or off here?
|
// FDIR will intercept event and switch PLOC power off
|
||||||
powerState = PowerState::ON;
|
powerState = PowerState::OFF;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sif::debug << "PlocMPSoCHandler::stepFailedReceived: Received unexpected action reply"
|
sif::debug << "PlocMPSoCHandler::stepFailedReceived: Received unexpected action reply"
|
||||||
|
@ -76,6 +76,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
uint8_t expectedReplies = 1, bool useAlternateId = false,
|
uint8_t expectedReplies = 1, bool useAlternateId = false,
|
||||||
DeviceCommandId_t alternateReplyID = 0) override;
|
DeviceCommandId_t alternateReplyID = 0) override;
|
||||||
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
|
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
|
||||||
|
virtual ReturnValue_t doSendReadHook() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HANDLER;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HANDLER;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user