diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-06 08:58:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-06 08:58:52 +0000 |
commit | d6d799ed48f8193bee286187132221f831726a07 (patch) | |
tree | 928f9db3dbb76cfdef92405635b8d1b7885e5b5e /src/include/queues.h | |
parent | ff4dd3f8f0f95652f754ab869b136d31d671ac51 (diff) | |
download | ChibiOS-d6d799ed48f8193bee286187132221f831726a07.tar.gz ChibiOS-d6d799ed48f8193bee286187132221f831726a07.tar.bz2 ChibiOS-d6d799ed48f8193bee286187132221f831726a07.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@39 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/queues.h')
-rw-r--r-- | src/include/queues.h | 64 |
1 files changed, 38 insertions, 26 deletions
diff --git a/src/include/queues.h b/src/include/queues.h index 117c6e9e8..31258ce69 100644 --- a/src/include/queues.h +++ b/src/include/queues.h @@ -84,28 +84,34 @@ typedef struct { #define chOQIsFull(q) \
(chQSpace(q) <= 0)
-/*
- * Input Queues functions. An Input Queue is usually written into by an
- * interrupt handler and read from a thread.
- */
-void chIQInit(Queue *qp, BYTE8 *buffer, t_size size, t_qnotify inotify);
-void chIQReset(Queue *qp);
-t_msg chIQPutI(Queue *qp, BYTE8 b);
-t_msg chIQGet(Queue *qp);
-t_size chIQRead(Queue *qp, BYTE8 *buffer, t_size n);
+#ifdef __cplusplus
+extern "C" {
+#endif
+ /*
+ * Input Queues functions. An Input Queue is usually written into by an
+ * interrupt handler and read from a thread.
+ */
+ void chIQInit(Queue *qp, BYTE8 *buffer, t_size size, t_qnotify inotify);
+ void chIQReset(Queue *qp);
+ t_msg chIQPutI(Queue *qp, BYTE8 b);
+ t_msg chIQGet(Queue *qp);
+ t_size chIQRead(Queue *qp, BYTE8 *buffer, t_size n);
#ifdef CH_USE_QUEUES_TIMEOUT
-t_msg chIQGetTimeout(Queue *qp, t_time time);
+ t_msg chIQGetTimeout(Queue *qp, t_time time);
#endif
-/*
- * Output Queues functions. An Output Queue is usually written into by a
- * thread and read from an interrupt handler.
- */
-void chOQInit(Queue *queue, BYTE8 *buffer, t_size size, t_qnotify onotify);
-void chOQReset(Queue *queue);
-void chOQPut(Queue *queue, BYTE8 b);
-t_msg chOQGetI(Queue *queue);
-t_size chOQWrite(Queue *queue, BYTE8 *buffer, t_size n);
+ /*
+ * Output Queues functions. An Output Queue is usually written into by a
+ * thread and read from an interrupt handler.
+ */
+ void chOQInit(Queue *queue, BYTE8 *buffer, t_size size, t_qnotify onotify);
+ void chOQReset(Queue *queue);
+ void chOQPut(Queue *queue, BYTE8 b);
+ t_msg chOQGetI(Queue *queue);
+ t_size chOQWrite(Queue *queue, BYTE8 *buffer, t_size n);
+#ifdef __cplusplus
+}
+#endif
#endif /* CH_USE_QUEUES */
#ifdef CH_USE_QUEUES_HALFDUPLEX
@@ -155,14 +161,20 @@ typedef struct { #define chHDQIsFullReceive(q) \
(chHDQFilledSpace(q) >= chHDQSize(q))
-void chHDQInit(HalfDuplexQueue *qp, BYTE8 *buffer, t_size size,
- t_qnotify inotify, t_qnotify onotify);
-t_msg chHDQGetReceive(HalfDuplexQueue *qp);
-void chHDQPutTransmit(HalfDuplexQueue *qp, BYTE8 b);
-t_msg chHDQGetTransmitI(HalfDuplexQueue *qp);
-t_msg chHDQPutReceiveI(HalfDuplexQueue *qp, BYTE8 b);
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void chHDQInit(HalfDuplexQueue *qp, BYTE8 *buffer, t_size size,
+ t_qnotify inotify, t_qnotify onotify);
+ t_msg chHDQGetReceive(HalfDuplexQueue *qp);
+ void chHDQPutTransmit(HalfDuplexQueue *qp, BYTE8 b);
+ t_msg chHDQGetTransmitI(HalfDuplexQueue *qp);
+ t_msg chHDQPutReceiveI(HalfDuplexQueue *qp, BYTE8 b);
#ifdef CH_USE_QUEUES_TIMEOUT
-t_msg chHDQGetReceiveTimeout(HalfDuplexQueue *qp, t_time time);
+ t_msg chHDQGetReceiveTimeout(HalfDuplexQueue *qp, t_time time);
+#endif
+#ifdef __cplusplus
+}
#endif
#endif /* CH_USE_QUEUES_HALFDUPLEX */
|