Index: firmware/App/Services/MsgQueues.h =================================================================== diff -u -ra7bf3ca23ea37a61000379facae628a31b3ecc59 -r5e0cd9b5be11ff4b2acaadbdcafc4ffe05172aa1 --- firmware/App/Services/MsgQueues.h (.../MsgQueues.h) (revision a7bf3ca23ea37a61000379facae628a31b3ecc59) +++ firmware/App/Services/MsgQueues.h (.../MsgQueues.h) (revision 5e0cd9b5be11ff4b2acaadbdcafc4ffe05172aa1) @@ -19,39 +19,52 @@ #define __MSG_QUEUES_H__ #include "DGCommon.h" + +/** + * @defgroup MsgQueues MsgQueues + * @brief Message queues service module. Provides message queue functionality + * including support functions for adding and getting a message. + * + * @addtogroup MsgQueues + * @{ + */ // ********** public definitions ********** -#define MAX_MSG_PAYLOAD_SIZE 100 // bytes - +#define MAX_MSG_PAYLOAD_SIZE 100 ///< Maximum message payload size in bytes. + +/// List of message queues. typedef enum Msg_Queues { - MSG_Q_IN = 0, - NUM_OF_MSG_QUEUES + MSG_Q_IN = 0, ///< Incoming message queue + NUM_OF_MSG_QUEUES ///< Number of message queues } MSG_QUEUE_T; -#pragma pack(push,1) +#pragma pack(push,1) +/// Message header struct. typedef struct { - S16 seqNo; // sequence # (and ACK required bit) of message - U16 msgID; // ID of message - U08 payloadLen; // length of payload in bytes + S16 seqNo; ///< Sequence number (and ACK required bit) of message + U16 msgID; ///< ID of message + U08 payloadLen; ///< Length of payload in bytes } MESSAGE_HEADER_T; - + +/// Message struct. typedef struct { - MESSAGE_HEADER_T hdr; // message header - U08 payload[ MAX_MSG_PAYLOAD_SIZE ]; // message payload + MESSAGE_HEADER_T hdr; ///< Message header + U08 payload[ MAX_MSG_PAYLOAD_SIZE ]; ///< Message payload } MESSAGE_T; - + +/// Message wrapper struct. typedef struct { - MESSAGE_T msg; // message - U08 crc; // message CRC + MESSAGE_T msg; ///< Message struct + U08 crc; ///< Message's crc } MESSAGE_WRAPPER_T; #pragma pack(pop) -#define MESSAGE_OVERHEAD_SIZE (sizeof(MESSAGE_HEADER_T) + sizeof(U08)) +#define MESSAGE_OVERHEAD_SIZE (sizeof(MESSAGE_HEADER_T) + sizeof(U08)) ///< Message overhead size // ********** public function prototypes ********** @@ -62,5 +75,7 @@ BOOL isMsgQueueFull( MSG_QUEUE_T queue ); void blankMessage( MESSAGE_T *message ); void blankMessageInWrapper( MESSAGE_WRAPPER_T *message ); + +/**@}*/ #endif