diff options
Diffstat (limited to 'lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h')
-rw-r--r-- | lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h | 63 |
1 files changed, 63 insertions, 0 deletions
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 new file mode 100644 index 0000000..63ae6ef --- /dev/null +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (C) ST-Ericsson SA 2011 + * License terms: 3-clause BSD license + ******************************************************************************/ +#ifndef T_PROTROM_HEADER_H_ +#define T_PROTROM_HEADER_H_ +/** + * @addtogroup ldr_communication_serv + * @{ + * @addtogroup protrom_family + * @{ + * @addtogroup ldr_protrom_header + * @{ + */ + +/******************************************************************************* + * Includes + ******************************************************************************/ +#include "t_basicdefinitions.h" + +/******************************************************************************* + * Types, constants + ******************************************************************************/ + +/** Header pattern for the protrom protocol*/ +#define PROTROM_HEADER_PATTERN (0xAA) +/** Source address in the header*/ +#define PROTROM_SOURCE_ADDRESS (0xEE) +/** Destination address in the header*/ +#define PROTROM_DESTINATION_ADDRESS (0xEE) +/** The length of the header */ +#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 + */ +#define NO_PROTROM_HEADER_PATTERN (0x00) +#define PROTROM_HEADER_PATTERN_MATCH (0x01) +#define PROTROM_HEADER_PATTERN_CANDIDATE (0x02) + +/** Protocol types*/ +typedef enum { + PROTO_PROTROM = 0xFB, /**< PROTROM protocol identification number. */ +} Protrom_Protocol_t; + +/** Header for command and bulk protocol */ +typedef struct { + uint8 HeaderPattern; /**< Header pattern for marking header start.*/ + uint8 Protocol; /**< Protocol type. */ + uint8 SourceAddress; /**< Source address. */ + uint8 DestinationAddress; /**< Destionation address. */ + uint8 ReservedField; /**< Reserved field. */ + uint16 PayloadLength; /**< Payload length. */ +} Protrom_Header_t; + +/** @} */ +/** @} */ +/** @} */ +#endif /*T_PROTROM_HEADER_H_*/ |