diff options
author | Viktor Mladenovski <viktor.mladenovski@stericsson.com> | 2011-05-20 14:10:59 +0200 |
---|---|---|
committer | Viktor Mladenovski <viktor.mladenovski@stericsson.com> | 2011-05-20 14:10:59 +0200 |
commit | f7e95217e936da34d7124aaced590692eb515923 (patch) | |
tree | 2d9ef4750a67d9d1dd3fe9180a4fef2929fad54b /source/LCM/include/t_protrom_header.h |
Initial contribution of loader_communication
ST-Ericsson ID: 326913
ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204
Change-Id: I171cfc2ee458a8a0a91a1916137d131f0f7ecee5
Diffstat (limited to 'source/LCM/include/t_protrom_header.h')
-rw-r--r-- | source/LCM/include/t_protrom_header.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/source/LCM/include/t_protrom_header.h b/source/LCM/include/t_protrom_header.h new file mode 100644 index 0000000..63ae6ef --- /dev/null +++ b/source/LCM/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_*/ |