diff options
Diffstat (limited to 'lcmodule')
4 files changed, 36 insertions, 31 deletions
diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc index 2652e31..f943863 100644 --- a/lcmodule/source/LCM.rc +++ b/lcmodule/source/LCM.rc @@ -69,15 +69,15 @@ BEGIN BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "Comments", "Build date: 2012-01-23"
+ VALUE "Comments", "Build date: 2012-01-25"
VALUE "CompanyName", "STEricsson AB"
VALUE "FileDescription", "LCM Dynamic Link Library"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "Loader Communication Module"
VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011"
- VALUE "PrivateBuild", "Change-Id: I2737059dcca62d769ca1876a4859f7c468fcfdd9"
+ VALUE "PrivateBuild", "Change-Id: I70835353a592d1f1ad40743640a1d0827e56fd2e"
VALUE "ProductName", "CXA1104507 Loader Communication Module"
- VALUE "ProductVersion", "P1Y"
+ VALUE "ProductVersion", "P2Y"
END
END
BLOCK "VarFileInfo"
diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c index 9e20d59..feff254 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c @@ -876,6 +876,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect #ifndef CFG_ENABLE_LOADER_TYPE //TODO find end release timer for retransmission BulkVector_p->State = PROCESSING_CHUNKS; + /* coverity[fallthrough] */ #else //... break; @@ -1027,7 +1028,9 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect } } +#ifndef CFG_ENABLE_LOADER_TYPE ErrExit: +#endif Do_CriticalSection_Leave(R15_TRANSPORT(Communication_p)->BulkHandle.BulkTransferCS); return ReturnValue; diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c index c8347bf..e5afef2 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c @@ -226,9 +226,9 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p) #ifdef CFG_ENABLE_LOADER_TYPE if (E_SUCCESS != Communication_p->CommunicationDevice_p->Read( - In_p->Target_p + ReqBufferOffset + In_p->RecBackupData, - ReqData - In_p->RecBackupData, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p)) { + In_p->Target_p + ReqBufferOffset + In_p->RecBackupData, + ReqData - In_p->RecBackupData, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p)) { /* Read failed! Return to previous state. */ In_p->ReqData = ReqData; In_p->ReqBuffOffset = ReqBufferOffset; @@ -271,8 +271,8 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p) #ifdef CFG_ENABLE_LOADER_TYPE if (E_SUCCESS != Communication_p->CommunicationDevice_p->Read( - In_p->Target_p + ReqBufferOffset, ReqData, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p)) { + In_p->Target_p + ReqBufferOffset, ReqData, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p)) { /* Read failed! Return to previous state. */ In_p->ReqData = ReqData; In_p->ReqBuffOffset = ReqBufferOffset; @@ -294,15 +294,15 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p) #ifdef CFG_ENABLE_LOADER_TYPE if (E_SUCCESS == Communication_p->CommunicationDevice_p->Read(In_p->Target_p, - ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p)) { + ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p)) { In_p->State = RECEIVE_HEADER; } #else (void)Communication_p->CommunicationDevice_p->Read(In_p->Target_p, - ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p); + ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p); In_p->State = RECEIVE_HEADER; #endif } @@ -314,9 +314,11 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) { ErrorCode_e ReturnValue = E_SUCCESS; R15_Outbound_t *Out_p = &(R15_NETWORK(Communication_p)->Outbound); - uint8 *HeaderStartInBuffer_p = NULL; uint8 *ExHeaderStartInBuffer_p = NULL; +#ifdef CFG_ENABLE_LOADER_TYPE + uint8 *HeaderStartInBuffer_p = NULL; boolean IsBufferContinuous = FALSE; +#endif uint32 ContinuousBufferLength = 0; boolean RegisterRetransmission = FALSE; uint32 ExtHdrLen = 0; @@ -344,9 +346,8 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) /* FALLTHROUGH */ case SEND_HEADER: - HeaderStartInBuffer_p = Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER; - #ifdef CFG_ENABLE_LOADER_TYPE + HeaderStartInBuffer_p = Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER; if (Out_p->Packet_p->Header.ExtendedHeaderLength == COMMAND_EXTENDED_HEADER_LENGTH) { ExtHdrLen = ALIGNED_COMMAND_EXTENDED_HEADER_LENGTH; @@ -377,10 +378,11 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) #else ContinuousBufferLength = ALIGNED_HEADER_LENGTH; Out_p->State = SENDING_HEADER; + #endif if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write((Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER), - ContinuousBufferLength, R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { + ContinuousBufferLength, R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { C_(printf("r15_network_layer.c (%d) Header Sent to comm device! \n", __LINE__);) } else { Out_p->State = SEND_HEADER; @@ -412,7 +414,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) } if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write(ExHeaderStartInBuffer_p, ExtHdrLen, - R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { + R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { C_(printf("r15_network_layer.c (%d) ExHeader Sent to comm device! \n", __LINE__);) } else { Out_p->State = SEND_EX_HEADER; @@ -432,8 +434,8 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) Aligned_Length = (Out_p->Packet_p->Header.PayloadLength + (ALIGN_SIZE - 1)) & (~(ALIGN_SIZE - 1)); if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write(Out_p->Packet_p->Payload_p, - Aligned_Length, - R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { + Aligned_Length, + R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { RegisterRetransmission = TRUE; C_(printf("r15_network_layer.c (%d) Payload Sent to comm device! \n", __LINE__);) } else { @@ -756,12 +758,12 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat R15_DeserializeBulkExtendedHeader(&BulkExtendedHeader, In_p->Target_p); IsValidHeader = R15_IsValidExtendedHeader(In_p->Target_p, - In_p->Header.ExtendedHeaderLength, - In_p->Header.ExtendedHeaderChecksum); + In_p->Header.ExtendedHeaderLength, + In_p->Header.ExtendedHeaderChecksum); if (IsValidHeader) { if (R15Header.Protocol == BULK_PROTOCOL && - (BulkExtendedHeader.TypeFlags & MASK_BULK_COMMAND_SELECT) == CMD_BULK_DATA) { + (BulkExtendedHeader.TypeFlags & MASK_BULK_COMMAND_SELECT) == CMD_BULK_DATA) { In_p->Packet_p = R15_Network_PacketAllocate(Communication_p, BULK_BUFFER_SIZE); } else { In_p->Packet_p = R15_Network_PacketAllocate(Communication_p, COMMAND_BUFFER_SIZE); @@ -802,10 +804,10 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat memcpy(Packet_p->Hash, &Packet_p->Header.PayloadChecksum, 4); Communication_p->HashDevice_p->Calculate(OBJECT_HASH(Communication_p), - HASH_NONE, - Packet_p->Payload_p, Packet_p->Header.PayloadLength, - Packet_p->Hash, (HashCallback_t)R15_InHashCallback, - (void *)Packet_p); + HASH_NONE, + Packet_p->Payload_p, Packet_p->Header.PayloadLength, + Packet_p->Hash, (HashCallback_t)R15_InHashCallback, + (void *)Packet_p); #endif In_p->Packet_p = NULL; @@ -857,10 +859,10 @@ static ErrorCode_e R15_Network_ReceivePayload(Communication_t *Communication_p) #endif Communication_p->HashDevice_p->Calculate(OBJECT_HASH(Communication_p), - Communication_p->CurrentFamilyHash, - Packet_p->Payload_p, Packet_p->Header.PayloadLength, - Packet_p->Hash, (HashCallback_t)R15_InHashCallback, - (void *)Packet_p); + Communication_p->CurrentFamilyHash, + Packet_p->Payload_p, Packet_p->Header.PayloadLength, + Packet_p->Hash, (HashCallback_t)R15_InHashCallback, + (void *)Packet_p); } else { SET_PACKET_FLAGS(Packet_p, PACKET_RX_STATE_MASK, BUF_PAYLOAD_CRC_OK); (void)QUEUE((Packet_p->Communication_p), FifoEnqueue_Fn)(OBJECT_QUEUE(Packet_p->Communication_p), Packet_p->Communication_p->Inbound_p, Packet_p); diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c index 3576b4a..d1243f6 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c @@ -13,6 +13,6 @@ * LCD_LCM_CompatibilityList in file LcdVersion.cpp in LCD code. */ -char LCM_CurrentVersion[] = "P1Y"; +char LCM_CurrentVersion[] = "P2Y"; /** @} */ |