summaryrefslogtreecommitdiff
path: root/source/CEH
diff options
context:
space:
mode:
Diffstat (limited to 'source/CEH')
-rw-r--r--source/CEH/ProtromRpcInterface.cpp11
-rw-r--r--source/CEH/ProtromRpcInterface.h3
-rw-r--r--source/CEH/ZRpcInterface.cpp13
-rw-r--r--source/CEH/ZRpcInterface.h3
-rw-r--r--source/CEH/commands_impl.cpp7
5 files changed, 19 insertions, 18 deletions
diff --git a/source/CEH/ProtromRpcInterface.cpp b/source/CEH/ProtromRpcInterface.cpp
index aa75334..d5a3dc8 100644
--- a/source/CEH/ProtromRpcInterface.cpp
+++ b/source/CEH/ProtromRpcInterface.cpp
@@ -9,10 +9,8 @@
ProtromRpcInterface::ProtromRpcInterface(CmdResult *CmdResult, LcmInterface *LcmInterface)
{
PROTROM_Payload = new uint8[0x10000];
- cancelDeviceOnResult_ = false;
cmdResult_ = CmdResult;
lcmInterface_ = LcmInterface;
- commDevice_ = NULL;
}
ProtromRpcInterface::~ProtromRpcInterface()
@@ -239,10 +237,6 @@ ErrorCode_e ProtromRpcInterface::DoneRPC_PROTROM_ResultImpl(CommandData_t CmdDat
// skip PDU type
Payload_p++;
- if (cancelDeviceOnResult_) {
- commDevice_->Cancel(lcmInterface_->getLCMContext());
- }
-
return E_SUCCESS;
}
@@ -265,8 +259,3 @@ ErrorCode_e ProtromRpcInterface::DoneRPC_PROTROM_ReadyToReceiveImpl(CommandData_
return E_SUCCESS;
}
-void ProtromRpcInterface::CancelDeviceOnResult(CommunicationDevice_t *commDevice)
-{
- cancelDeviceOnResult_ = true;
- commDevice_ = commDevice;
-}
diff --git a/source/CEH/ProtromRpcInterface.h b/source/CEH/ProtromRpcInterface.h
index 43ed46f..5f928fd 100644
--- a/source/CEH/ProtromRpcInterface.h
+++ b/source/CEH/ProtromRpcInterface.h
@@ -67,11 +67,8 @@ public:
ErrorCode_e Do_CEH_Callback(CommandData_t *pCmdData);
- void CancelDeviceOnResult(CommunicationDevice_t *commDevice);
private:
uint8 *PROTROM_Payload;
- bool cancelDeviceOnResult_;
- CommunicationDevice_t *commDevice_;
CmdResult *cmdResult_;
LcmInterface *lcmInterface_;
};
diff --git a/source/CEH/ZRpcInterface.cpp b/source/CEH/ZRpcInterface.cpp
index 5476e8f..ea0c82a 100644
--- a/source/CEH/ZRpcInterface.cpp
+++ b/source/CEH/ZRpcInterface.cpp
@@ -8,6 +8,7 @@
ZRpcInterface::ZRpcInterface(CmdResult *CmdResult, LcmInterface *LcmInterface)
{
Z_Payload = 0;
+ Z_Payload_SetBaudrate = 0;
cmdResult_ = CmdResult;
lcmInterface_ = LcmInterface;
@@ -18,6 +19,7 @@ ZRpcInterface::~ZRpcInterface()
{
delete Z_IndataBuffer;
delete[] Z_Payload;
+ delete[] Z_Payload_SetBaudrate;
}
ErrorCode_e ZRpcInterface::Do_CEH_Callback(CommandData_t *CmdData_p)
@@ -98,14 +100,19 @@ ErrorCode_e ZRpcInterface::DoRPC_Z_SetBaudrate(int Baudrate)
Z_Payload = 0;
}
- Z_Payload = new uint8[3];
+ Z_Payload = new uint8[2];
- Z_Payload[0] = 0x02;
+ Z_Payload[0] = 0x01;
Z_Payload[1] = 'S';
- Z_Payload[2] = Rate;
Result = lcmInterface_->CommunicationSend(Z_Payload);
+ Z_Payload_SetBaudrate = new uint8[2];
+ Z_Payload_SetBaudrate[0] = 0x01;
+ Z_Payload_SetBaudrate[1] = Rate;
+
+ Result = lcmInterface_->CommunicationSend(Z_Payload_SetBaudrate);
+
return Result;
}
diff --git a/source/CEH/ZRpcInterface.h b/source/CEH/ZRpcInterface.h
index 3d630c2..99bc96f 100644
--- a/source/CEH/ZRpcInterface.h
+++ b/source/CEH/ZRpcInterface.h
@@ -29,8 +29,9 @@ public:
ErrorCode_e Do_CEH_Callback(CommandData_t *pCmdData);
private:
- //Payload variable for z-protocol
+ //Payload variables for z-protocol
uint8 *Z_Payload;
+ uint8 *Z_Payload_SetBaudrate;
CmdResult *cmdResult_;
LcmInterface *lcmInterface_;
};
diff --git a/source/CEH/commands_impl.cpp b/source/CEH/commands_impl.cpp
index f08acb1..066e1a1 100644
--- a/source/CEH/commands_impl.cpp
+++ b/source/CEH/commands_impl.cpp
@@ -124,6 +124,13 @@ ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_System_SwitchCommunicationDeviceImpl
return E_SUCCESS;
}
+ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_System_StartCommRelayImpl(uint16 Session, ErrorCode_e Status)
+{
+ cmdResult_->GeneralResponse_Session = Session;
+
+ return E_SUCCESS;
+}
+
ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_Flash_ProcessFileImpl(uint16 Session, ErrorCode_e Status)
{
cmdResult_->GeneralResponse_Session = Session;