summaryrefslogtreecommitdiff
path: root/lcmodule/source/cnh1605205_ldr_network_layer
diff options
context:
space:
mode:
Diffstat (limited to 'lcmodule/source/cnh1605205_ldr_network_layer')
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h2
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h1
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h2
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h7
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h8
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h4
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h20
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h2
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h25
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h2
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h10
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c2
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c6
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c2
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c8
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c8
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c11
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c6
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c10
19 files changed, 67 insertions, 69 deletions
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h
index fd6efb7..a4007e5 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h
@@ -58,7 +58,7 @@ ErrorCode_e A2_Network_Shutdown(const Communication_t *const Communication_p);
ErrorCode_e A2_Network_CancelRetransmission(const Communication_t *const Communication_p, uint32 UniqueKey);
/**
- * Handler for received packets in A2 protocl family.
+ * Handler for received packets in A2 protocol family.
*
* This callback function handles the received packets.
*
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h
index 8165430..1462f12 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h
@@ -19,7 +19,6 @@
* Includes
******************************************************************************/
#include <t_basicdefinitions.h>
-#include "t_protrom_header.h"
#include "t_protrom_network.h"
/*******************************************************************************
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h
index a6e897c..c18108d 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h
@@ -51,7 +51,7 @@ ErrorCode_e Protrom_Network_Shutdown(const Communication_t *const Communication_
*
* @param [in] Data_p Pointer to the received data.
* @param [in] Length Length of the received data.
- * @param [in] Param_p Extra parameteres.
+ * @param [in] Param_p Extra parameters.
*
* @return none.
*/
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h
index cf739b5..9a2c53f 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h
@@ -22,7 +22,6 @@
#include "error_codes.h"
#include "t_basicdefinitions.h"
#include "t_r15_network_layer.h"
-#include "t_communication_service.h"
/*******************************************************************************
* Declaration of functions
@@ -66,14 +65,14 @@ ErrorCode_e R15_Network_CancelRetransmission(const Communication_t *const Commun
* combination of protocol type, session number and command.
*
* @param [in] Packet_p Pointer to the packet.
- * @param [in] ExternalKey External key for marking the packet for retransmision.
+ * @param [in] ExternalKey External key for marking the packet for retransmission.
*
* @return Unique key.
*/
uint32 R15_Network_CreateUniqueKey(const PacketMeta_t *const Packet_p, const uint8 ExternalKey);
/**
- * Handler for received packets in R15 protocl family.
+ * Handler for received packets in R15 protocol family.
*
* This callback function handles the received packets.
*
@@ -114,7 +113,7 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p);
/**
* Handler for sending data.
*
- * This function checks if new data is available for sending and handles the transmision.
+ * This function checks if new data is available for sending and handles the transmission.
*
* @param [in,out] Communication_p Communication module context.
*
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h
index c8450e5..892eb6f 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h
@@ -49,7 +49,7 @@ ErrorCode_e Z_Network_Initialize(Communication_t *Communication_p);
ErrorCode_e Z_Network_Shutdown(const Communication_t *const Communication_p);
/**
- * Handler for received packets in Z protcol family.
+ * Handler for received packets in Z protocol family.
*
* This callback function handles the received packets.
*
@@ -77,7 +77,7 @@ void Z_Network_ReadCallback(const void *Data_p, const uint32 Length, void *Param
void Z_Network_WriteCallback(const void *Data_p, const uint32 Length, void *Param_p);
/**
- * Handler for receiving new data in Z protcol family.
+ * Handler for receiving new data in Z protocol family.
*
* This function checks if new data has been received.
*
@@ -89,9 +89,9 @@ void Z_Network_ReceiverHandler(Communication_t *Communication_p);
/**
- * Handler for sending new data in Z protcol family.
+ * Handler for sending new data in Z protocol family.
*
- * This function checks if new data has been transmited.
+ * This function checks if new data has been transmitted.
*
* @param [in] Communication_p Communication module context.
* @param [in] SendingContent_p Pointer to the sending context.
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h
index 63ae6ef..a434e79 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h
@@ -32,8 +32,6 @@
#define PROTROM_HEADER_LENGTH 7
/** Value of the reserved field */
#define PROTROM_RESERVED_FIELD 0x00
-/** Offset of the header in the buffer */
-#define HEADER_OFFSET_IN_BUFFER 8
/**
* Header search results
@@ -52,7 +50,7 @@ typedef struct {
uint8 HeaderPattern; /**< Header pattern for marking header start.*/
uint8 Protocol; /**< Protocol type. */
uint8 SourceAddress; /**< Source address. */
- uint8 DestinationAddress; /**< Destionation address. */
+ uint8 DestinationAddress; /**< Destination address. */
uint8 ReservedField; /**< Reserved field. */
uint16 PayloadLength; /**< Payload length. */
} Protrom_Header_t;
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h
index b29a65a..fe693f4 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h
@@ -39,11 +39,11 @@ typedef enum {
/** Defined state of the transmitter */
typedef enum {
- PROTROM_SEND_IDLE, /**< Transmiter idle state.*/
- PROTROM_SEND_HEADER, /**< Transmiter send header. */
- PROTROM_SEND_PAYLOAD, /**< Transmiter send payload. */
- PROTROM_SENDING_HEADER, /**< Transmiter is in process sending header.*/
- PROTROM_SENDING_PAYLOAD /**< Transmiter is in process sending payload.*/
+ PROTROM_SEND_IDLE, /**< Transmitter idle state.*/
+ PROTROM_SEND_HEADER, /**< Transmitter send header. */
+ PROTROM_SEND_PAYLOAD, /**< Transmitter send payload. */
+ PROTROM_SENDING_HEADER, /**< Transmitter is in process sending header.*/
+ PROTROM_SENDING_PAYLOAD /**< Transmitter is in process sending payload.*/
} Protrom_OutboundState_t;
/** Structure for the packet meta data type. */
@@ -52,8 +52,8 @@ typedef struct Protrom_Packet {
uint8 *Buffer_p; /**< Temporary buffer for receiving data.*/
uint16 CRC; /**< Calculated CRC of received packet. */
Communication_t *Communication_p; /**< The communication over which this
- packet has been/is to be transferred
- over */
+ packet has been/is to be transferred
+ over */
} Protrom_Packet_t;
/** Structure for handling incoming PROTROM packets.*/
@@ -62,9 +62,9 @@ typedef struct {
Protrom_InboundState_t State;
/**< Number of requested data for receiving from communication device. */
uint32 ReqData;
- /**< Number of receivied data from communication device. */
+ /**< Number of received data from communication device. */
uint32 RecData;
- /**< Number of receivied data from backup buffer used for switching the
+ /**< Number of received data from backup buffer used for switching the
* protocol family. */
uint32 RecBackupData;
/**< Offset in the buffer for next data that should be received. */
@@ -73,7 +73,7 @@ typedef struct {
uint8 *Target_p;
/**< Temporary buffer for receiving data. */
uint8 Scratch[PROTROM_HEADER_LENGTH];
- /** Number of packets before receiver is stoped. */
+ /** Number of packets before receiver is stopped. */
uint8 PacketsBeforeReceiverStop;
/** Indicator for stopping the receiver. */
boolean StopTransfer;
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h
index e31ca8c..4b5cc70 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h
@@ -69,7 +69,7 @@ typedef struct {
uint8 HeaderPattern; /**< Header pattern for marking header start.*/
uint8 Protocol; /**< Protocol type. */
uint16 HeaderPatternExtension; /**< Header pattern extension.*/
- uint8 Flags; /**< Flasgs for the header.*/
+ uint8 Flags; /**< Flags for the header.*/
uint8 ExtendedHeaderLength; /**< Extended header length.*/
uint8 ExtendedHeaderChecksum; /**< Extended header checksum.*/
uint32 PayloadLength; /**< Payload length. */
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h
index 0bd2944..408fdf9 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h
@@ -71,8 +71,8 @@
/** Size of a buffer used for commands. */
#define COMMAND_BUFFER_SIZE 0x00010000
-/** Size of a buffer used for bulk transfer,
- * must be biger than buffer for commands. */
+/** Size of a payload buffer used for bulk transfer,
+ * must be larger than buffer for commands. */
#define BULK_BUFFER_SIZE 0x00100000
@@ -86,7 +86,7 @@
#define SESSION_MASK 0xFFFC
/**
- * Defines all posible types of buffers that can be created (allocated).
+ * Defines all possible types of buffers that can be created (allocated).
*
* It is used to specified the type of the buffer
* when allocating a new buffer. Also it is used when
@@ -108,7 +108,7 @@ TYPEDEF_ENUM {
BUF_TX_SENT = 0x00000008, /**< The buffer is sent and wait ACK. */
BUF_TX_DONE = 0x00000010, /**< The buffer has been sent and can
be deallocated. */
- BUF_TX_TIMEOUT = 0x00000020, /**< The timeout ocure when buffer is
+ BUF_TX_TIMEOUT = 0x00000020, /**< The timeout occur when buffer is
sending. */
BUF_RX_READY = 0x00000040, /**< The buffer is filled with
received data and is ready for
@@ -201,7 +201,7 @@ typedef void (*PacketCallBack_t)(Communication_t *Communication_p, const void *D
/** Structure for the packet meta data. */
typedef struct PacketMeta {
- PacketCallBack_t CallBack_p; /**< Cllback function used after
+ PacketCallBack_t CallBack_p; /**< Callback function used after
sending packet.*/
uint32 Flags; /**< Field is a bit-field. Flags
for the Packet state. */
@@ -209,9 +209,9 @@ typedef struct PacketMeta {
corresponding buffer used in
the packet. */
R15_Header_t Header; /**< Structure of the header. */
- uint32 Resend; /**< Resend counter. */
+ uint32 Resend; /**< Resent counter. */
Timer_t *Timer_p; /**< Timer data used for
- sending/reciving packet. */
+ sending/receiving packet. */
uint8 *ExtendedHeader_p; /**< Pointer to the extended
header located in the packet. */
uint8 *Payload_p; /**< Pointer to the payload data
@@ -234,8 +234,7 @@ typedef struct {
uint32 Timeout; /**< Defined timeout for retransmission. */
uint32 TimerKey; /**< Timer identification number.*/
uint32 Key; /**< Generated unique key, used for marking packet for
- retransmission or removing from
- retransmission list. */
+ retransmission or removing from retransmission list. */
PacketMeta_t *Packet_p; /**< Pointer to the packet for retransmission. */
} RetransmissionContext_t;
@@ -246,9 +245,9 @@ typedef struct {
R15_InboundState_t State;
/**< Number of requested data for receiving from communication device. */
uint32 ReqData;
- /**< Number of receivied data from communication device. */
+ /**< Number of received data from communication device. */
uint32 RecData;
- /**< Number of receivied data from backup buffer used for switching the
+ /**< Number of received data from backup buffer used for switching the
* protocol family. */
uint32 RecBackupData;
/**< Offset in the buffer for next data that should be received. */
@@ -259,9 +258,9 @@ typedef struct {
uint8 Scratch[ALIGNED_HEADER_LENGTH + ALIGNED_BULK_EXTENDED_HEADER_LENGTH];
/** Temporary structure for handling R15 packet.*/
R15_Header_t Header;
- /** Poiter to meta data for allocated buffer for handling R15 packet.*/
+ /** Pointer to meta data for allocated buffer for handling R15 packet.*/
PacketMeta_t *Packet_p;
- /** Number of packets before receiver is stoped. */
+ /** Number of packets before receiver is stopped. */
uint8 PacketsBeforeReceiverStop;
/** Indicator for stopping the receiver. */
boolean StopTransfer;
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h
index 09fe771..0eab5d2 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h
@@ -10,7 +10,7 @@
* @addtogroup z_family
* @{
* @addtogroup ldr_z_header Z header
- * Functionalities for analizing header from Z protocol family.
+ * Functionalities for analyzing header from Z protocol family.
*
* @{
*/
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h
index 7f66e67..fa189f1 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h
@@ -34,9 +34,9 @@ typedef enum {
/** Defined state of the transmitter */
typedef enum {
- Z_SEND_IDLE, /**< Transmiter idle state.*/
- Z_SEND_PACKET, /**< Transmiter send packet. */
- Z_SENDING_PACKET /**< Transmiter is in process sending packet.*/
+ Z_SEND_IDLE, /**< Transmitter idle state.*/
+ Z_SEND_PACKET, /**< Transmitter send packet. */
+ Z_SENDING_PACKET /**< Transmitter is in process sending packet.*/
} Z_OutboundState_t;
/** Structure for handling incoming Z packets.*/
@@ -45,11 +45,11 @@ typedef struct {
Z_InboundState_t State;
/**< Number of requested data for receiving from communication device. */
uint32 ReqData;
- /**< Number of receivied data from communication device. */
+ /**< Number of received data from communication device. */
uint32 RecData;
/**< Temporary pointer to buffer for handling received data.*/
uint8 *Target_p;
- /** Number of packets before receiver is stoped. */
+ /** Number of packets before receiver is stopped. */
uint8 PacketsBeforeReceiverStop;
/** Indicator for stopping the receiver. */
boolean StopTransfer;
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c
index fd48503..6215372 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c
@@ -14,7 +14,7 @@
/*******************************************************************************
* Includes
******************************************************************************/
-#include "c_system.h"
+#include "c_system_v2.h"
#include <string.h>
#include "t_basicdefinitions.h"
#include "r_a2_header.h"
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c
index 1aa32a3..bfc0f97 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c
@@ -17,7 +17,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include "c_system.h"
+#include "c_system_v2.h"
#include "r_basicdefinitions.h"
#include "r_a2_family.h"
#include "r_a2_transport.h"
@@ -29,10 +29,6 @@
#include "r_debug_macro.h"
#include "r_critical_section.h"
-#ifdef WIN32
-#include <windows.h>
-#endif
-
/*******************************************************************************
* Declaration of file local functions
******************************************************************************/
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c
index acc7836..acb8806 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c
@@ -14,7 +14,7 @@
/*******************************************************************************
* Includes
******************************************************************************/
-#include "c_system.h"
+#include "c_system_v2.h"
#include <string.h>
#include "t_basicdefinitions.h"
#include "r_protrom_header.h"
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c
index 11410e2..47602a6 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c
@@ -16,7 +16,7 @@
******************************************************************************/
#include <stdlib.h>
#include <string.h>
-#include "c_system.h"
+#include "c_system_v2.h"
#include "t_basicdefinitions.h"
#include "r_protrom_family.h"
#include "r_protrom_transport.h"
@@ -28,10 +28,6 @@
#include "r_debug_macro.h"
#include "r_critical_section.h"
-#ifdef WIN32
-#include <windows.h>
-#endif
-
/*******************************************************************************
* Declaration of file local functions
******************************************************************************/
@@ -393,7 +389,7 @@ static ErrorCode_e Protrom_Network_TransmiterHandler(Communication_t *Communicat
Out_p->Packet_p = (Protrom_Packet_t *)QUEUE(Communication_p, FifoDequeue_Fn)(OBJECT_QUEUE(Communication_p), Communication_p->Outbound_p);
if (NULL != Out_p->Packet_p) {
- /* get next packet for transmiting */
+ /* get next packet for transmitting */
Out_p->State = PROTROM_SEND_HEADER;
} else {
break;
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c
index be504e5..5687bcf 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c
@@ -14,7 +14,7 @@
/*******************************************************************************
* Includes
******************************************************************************/
-#include "c_system.h"
+#include "c_system_v2.h"
#include <string.h>
#include "t_basicdefinitions.h"
#include "r_r15_header.h"
@@ -224,8 +224,12 @@ boolean R15_IsReceivedHeader(R15_Inbound_t *In_p)
In_p->ReqBuffOffset = In_p->RecData - StartHeaderInBuffer;
}
} else {
- In_p->ReqData = ALIGNED_HEADER_LENGTH;
+ /* Sync the header. */
+ In_p->RecData = 0;
In_p->ReqBuffOffset = 0;
+ In_p->State = RECEIVE_HEADER;
+ In_p->ReqData = ALIGNED_HEADER_LENGTH;
+ In_p->Target_p = In_p->Scratch;
}
}
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 e5afef2..509e8cf 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
@@ -14,13 +14,13 @@
/*******************************************************************************
* Includes
******************************************************************************/
+#include <stdlib.h>
+#include <string.h>
#include "r_r15_network_layer.h"
#include "r_basicdefinitions.h"
-#include <stdlib.h>
#include "r_debug.h"
#include "r_debug_macro.h"
-#include <string.h>
-#include "c_system.h"
+#include "c_system_v2.h"
#include "r_r15_transport_layer.h"
#include "r_r15_family.h"
#include "r_r15_header.h"
@@ -466,7 +466,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p)
* Cancel retransmission of packets.
*
* @param [in,out] Communication_p Communication module context.
- * @param [in] UniqueKey Unique key used for identification of packet
+ * @param [in] UniqueKey Unique key used for identification of packet
* for retransmission.
*
* @return none.
@@ -729,6 +729,7 @@ static ErrorCode_e R15_Network_ReceiveHeader(const Communication_t *const Commun
if (print_header) {
uint32 Counter = 0;
+ print_header = 0;
printf("Invalid header! \n");
for (Counter = 0; Counter < 16; Counter++) {
@@ -818,7 +819,7 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat
} else {
A_(
uint32 Counter = 0;
- printf("Invalid exheader! \n");
+ printf("Invalid extended header! \n");
for (Counter = 0; Counter < 16; Counter++) {
printf(" %02X", In_p->Target_p[Counter]);
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c
index 4ec23eb..6ed92c2 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c
@@ -16,7 +16,7 @@
******************************************************************************/
#include <stdlib.h>
#include <string.h>
-#include "c_system.h"
+#include "c_system_v2.h"
#include "t_basicdefinitions.h"
#include "r_z_family.h"
#include "r_z_transport.h"
@@ -26,10 +26,6 @@
#include "r_communication_service.h"
#include "r_critical_section.h"
-#ifdef WIN32
-#include <windows.h>
-#endif
-
/*******************************************************************************
* Declaration of file local functions
******************************************************************************/
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c b/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c
index 68455bf..ddce514 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c
@@ -25,8 +25,10 @@
#include "r_adbg_case.h"
#include "r_adbg_module.h"
#include "r_adbg_command.h"
+#ifndef CFG_ENABLE_LOADER_TYPE
#include "r_a2_header.h"
#include "r_a2_network.h"
+#endif // CFG_ENABLE_LOADER_TYPE
#include "r_r15_header.h"
#include "r_r15_network_layer.h"
#include <stdlib.h>
@@ -34,6 +36,7 @@
/*******************************************************************************
* The test case functions declarations
******************************************************************************/
+#ifndef CFG_ENABLE_LOADER_TYPE
static void ADbg_A2_GetPacketLength(ADbg_Case_t *Case_p);
static void ADbg_A2_IsValidHeader(ADbg_Case_t *Case_p);
static void ADbg_A2_IsReceivedHeader(ADbg_Case_t *Case_p);
@@ -42,6 +45,7 @@ static void ADbg_A2_Network_Initialize(ADbg_Case_t *Case_p);
static void ADbg_A2_Network_Shutdown(ADbg_Case_t *Case_p);
static void ADbg_A2_Network_PacketAllocate(ADbg_Case_t *Case_p);
static void ADbg_A2_Network_PacketRelease(ADbg_Case_t *Case_p);
+#endif // CFG_ENABLE_LOADER_TYPE
static void ADbg_R15_GetPacketLength(ADbg_Case_t *Case_p);
static void ADbg_R15_IsValidHeader(ADbg_Case_t *Case_p);
@@ -57,6 +61,7 @@ static void ADbg_R15_Network_PacketRelease(ADbg_Case_t *Case_p);
/*******************************************************************************
* The test case definitions
******************************************************************************/
+#ifndef CFG_ENABLE_LOADER_TYPE
static uint8 Parameters1_1[3] = {2, WORDPTR, WORD};
ADBG_CASE_DEFINE(Test_A2_GetPacketLength, 1, 9, ADbg_A2_GetPacketLength, Parameters1_1);
static uint8 Parameters1_2[3] = {2, VOIDPTR, BYTE};
@@ -72,6 +77,7 @@ static uint8 Parameters2_3[4] = {3, WORDPTR, WORD, WORDPTR};
ADBG_CASE_DEFINE(Test_A2_Network_PacketAllocate, 6, 9, ADbg_A2_Network_PacketAllocate, Parameters2_3);
static uint8 Parameters2_4[4] = {3, WORDPTR, WORD, WORDPTR};
ADBG_CASE_DEFINE(Test_A2_Network_PacketRelease, 7, 9, ADbg_A2_Network_PacketRelease, Parameters2_4);
+#endif // CFG_ENABLE_LOADER_TYPE
static uint8 Parameters3_1[3] = {2, WORDPTR, WORD};
ADBG_CASE_DEFINE(Test_R15_GetPacketLength, 8, 9, ADbg_R15_GetPacketLength, Parameters3_1);
@@ -98,6 +104,7 @@ ADBG_CASE_DEFINE(Test_R15_Network_PacketRelease, 16, 9, ADbg_R15_Network_PacketR
******************************************************************************/
ADBG_SUITE_DEFINE_BEGIN(TestCase_CNH1605205, 0, 9)
+#ifndef CFG_ENABLE_LOADER_TYPE
ADBG_SUITE_ENTRY(Test_A2_GetPacketLength)
ADBG_SUITE_ENTRY(Test_A2_IsValidHeader)
ADBG_SUITE_ENTRY(Test_A2_IsReceivedHeader)
@@ -106,6 +113,7 @@ ADBG_SUITE_ENTRY(Test_A2_Network_Initialize)
ADBG_SUITE_ENTRY(Test_A2_Network_Shutdown)
ADBG_SUITE_ENTRY(Test_A2_Network_PacketAllocate)
ADBG_SUITE_ENTRY(Test_A2_Network_PacketRelease)
+#endif // CFG_ENABLE_LOADER_TYPE
ADBG_SUITE_ENTRY(Test_R15_GetPacketLength)
ADBG_SUITE_ENTRY(Test_R15_IsValidHeader)
@@ -132,6 +140,7 @@ void Do_CNH1605205_Module_Test_Run(ADbg_MainModule_t *MainModule_p)
/*******************************************************************************
* Test cases
******************************************************************************/
+#ifndef CFG_ENABLE_LOADER_TYPE
/**
* This function will test function:
* A2_GetPacketLength.
@@ -315,6 +324,7 @@ static void ADbg_A2_Network_PacketRelease(ADbg_Case_t *Case_p)
free(Meta_p);
}
}
+#endif // CFG_ENABLE_LOADER_TYPE
/**
* This function will test function: