Index: App/Services/MsgQueues.c =================================================================== diff -u -r24f2fc89f0bfb62edcae316511e3fb4d7a336d01 -r7d70e839bc71f6fc37da8cd12eecb374841882df --- App/Services/MsgQueues.c (.../MsgQueues.c) (revision 24f2fc89f0bfb62edcae316511e3fb4d7a336d01) +++ App/Services/MsgQueues.c (.../MsgQueues.c) (revision 7d70e839bc71f6fc37da8cd12eecb374841882df) @@ -30,8 +30,6 @@ // ********** private function prototypes ********** -static void blankMessageInWrapper( MESSAGE_WRAPPER_T *message ); - /************************************************************************* * @brief initMsgQueues * The initMsgQueues function initializes the MsgQueues module. @@ -69,11 +67,7 @@ * @param msg : a pointer to a message structure to add to the queue * @return TRUE if message added to queue, FALSE if could not *************************************************************************/ -//static U32 msgQueueCounts[NUM_OF_MSG_QUEUES]; -//static U32 msgQueueStarts[NUM_OF_MSG_QUEUES]; -//static U32 msgQueueNexts[NUM_OF_MSG_QUEUES]; -//static MESSAGE_WRAPPER_T msgQueues[NUM_OF_MSG_QUEUES][MAX_MSG_QUEUE_SIZE]; -BOOL addToMsgQueue( MSG_QUEUE_T queue, MESSAGE_T *msg ) +BOOL addToMsgQueue( MSG_QUEUE_T queue, MESSAGE_WRAPPER_T *msg ) { BOOL result = FALSE; @@ -107,7 +101,7 @@ if ( FALSE == full ) { // add message to queue - msgQueues[queue][next].msg = *msg; + msgQueues[queue][next] = *msg; // TODO - calculate CRC for given message (just zero for now) msgQueues[queue][next].crc = 0x0; @@ -171,6 +165,8 @@ { // get message from queue *msg = msgQueues[queue][first]; + + result = TRUE; } else // message queue is full { @@ -249,10 +245,10 @@ * @details * Inputs : none * Outputs : none - * @param message : the message in a wrapper to blank. + * @param message : Pointer to the message in a wrapper to blank. * @return none *************************************************************************/ -static void blankMessageInWrapper( MESSAGE_WRAPPER_T *message ) +void blankMessageInWrapper( MESSAGE_WRAPPER_T *message ) { U32 i; U32 msgSize = sizeof(MESSAGE_WRAPPER_T); @@ -267,3 +263,5 @@ message->msg.hdr.msgID = 0xFFFF; } + +