6cc948eef8
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@113 9fe90eed-be63-e94b-8204-d34ff4c2ff93
73 lines
2.6 KiB
C
73 lines
2.6 KiB
C
/* ---------------------------------------------------------------------------
|
|
* MessageQueue.h - v0.1 (c) 2008 Micro-key bv
|
|
* ---------------------------------------------------------------------------
|
|
* Micro-key bv
|
|
* Industrieweg 28, 9804 TG Noordhorn
|
|
* Postbus 92, 9800 AB Zuidhorn
|
|
* The Netherlands
|
|
* Tel: +31 594 503020
|
|
* Fax: +31 594 505825
|
|
* Email: support@microkey.nl
|
|
* Web: www.microkey.nl
|
|
* ---------------------------------------------------------------------------
|
|
* Description:
|
|
* ---------------------------------------------------------------------------
|
|
* Version(s): 0.1, Jan 29, 2008, FSc
|
|
* Creation.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
#ifndef __MESSAGEQUEUE_H__
|
|
#define __MESSAGEQUEUE_H__
|
|
/** \file MessageQueue.h
|
|
\brief
|
|
*/
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* System include files.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Application include files.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
#include "types.h"
|
|
#include "BpMessageFormat.h"
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Constant and macro definitions.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
#define TX_QUEUE_SIZE (20)
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Type definitions.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
typedef struct t_mq_MESSAGEQUEUE
|
|
{
|
|
t_bpmsg_message messages[TX_QUEUE_SIZE];
|
|
UINT8 head;
|
|
UINT8 tail;
|
|
UINT8 count;
|
|
} t_mq_messagequeue;
|
|
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Variable declarations.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Function declarations.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
t_mq_messagequeue *mqInit();
|
|
RESULT mqAdd( t_mq_messagequeue *queue, t_bpmsg_message *message);
|
|
RESULT mqGet( t_mq_messagequeue *queue, t_bpmsg_message *message);
|
|
BOOLEAN mqEmpty( t_mq_messagequeue *queue );
|
|
|
|
|
|
#endif /* __MESSAGEQUEUE_H__ */
|
|
|