summaryrefslogtreecommitdiff
path: root/source/LCM/include/t_protrom_network.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/LCM/include/t_protrom_network.h')
-rw-r--r--source/LCM/include/t_protrom_network.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/source/LCM/include/t_protrom_network.h b/source/LCM/include/t_protrom_network.h
index c33deac..955b589 100644
--- a/source/LCM/include/t_protrom_network.h
+++ b/source/LCM/include/t_protrom_network.h
@@ -17,6 +17,7 @@
* Includes
******************************************************************************/
#include "t_communication_service.h"
+#include "t_critical_section.h"
#include "t_protrom_header.h"
/*******************************************************************************
@@ -32,14 +33,17 @@
typedef enum {
PROTROM_RECEIVE_HEADER, /**< State for receiving Header.*/
PROTROM_RECEIVE_PAYLOAD, /**< State for receiving Payload.*/
- PROTROM_RECEIVE_ERROR /**< State for error handling.*/
+ PROTROM_RECEIVE_ERROR, /**< State for error handling.*/
+ PROTROM_RECEIVE_IDLE /**< State for receiver idele.*/
} Protrom_InboundState_t;
/** Defined state of the transmitter */
typedef enum {
PROTROM_SEND_IDLE, /**< Transmiter idle state.*/
- PROTROM_SEND_PACKET, /**< Transmiter send packet. */
- PROTROM_SENDING_PACKET /**< Transmiter is in process sending packet.*/
+ 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_OutboundState_t;
/** Structure for the packet meta data type. */
@@ -69,6 +73,10 @@ typedef struct {
uint8 *Target_p;
/**< Temporary buffer for receiving data. */
uint8 Scratch[PROTROM_HEADER_LENGTH];
+ /** Number of packets before receiver is stoped. */
+ uint8 PacketsBeforeReceiverStop;
+ /** Indicator for stopping the receiver. */
+ boolean StopTransfer;
/** Temporary structure for handling PROTROM packet.*/
Protrom_Packet_t *Packet_p;
} Protrom_Inbound_t;
@@ -79,8 +87,8 @@ typedef struct {
Protrom_OutboundState_t State;
/** Temporary pointer for handling PROTROM packet.*/
Protrom_Packet_t *Packet_p;
- /**< Boolean value for controling re-entry in transmiter fucntion. */
- boolean InLoad;
+ /**< Synchronization object to avoid parallel access in transmitter function. */
+ CriticalSection_t TxCriticalSection;
} Protrom_Outbound_t;