aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/hal_queues.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-10-29 15:31:22 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-10-29 15:31:22 +0000
commit00969133d278e36593d1b88513935b2e78ef2517 (patch)
tree55d43ff0cab73f08d883f9aaaf3aef967e44c9cb /os/hal/include/hal_queues.h
parenta8f7a7bd427294f96647529a7f0bfb3918eb6918 (diff)
downloadChibiOS-00969133d278e36593d1b88513935b2e78ef2517.tar.gz
ChibiOS-00969133d278e36593d1b88513935b2e78ef2517.tar.bz2
ChibiOS-00969133d278e36593d1b88513935b2e78ef2517.zip
HAL queues rework, not finished.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10906 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/hal_queues.h')
-rw-r--r--os/hal/include/hal_queues.h83
1 files changed, 49 insertions, 34 deletions
diff --git a/os/hal/include/hal_queues.h b/os/hal/include/hal_queues.h
index ffafc8805..300ccb18d 100644
--- a/os/hal/include/hal_queues.h
+++ b/os/hal/include/hal_queues.h
@@ -25,6 +25,10 @@
#ifndef HAL_QUEUES_H
#define HAL_QUEUES_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/**
* @name Queue functions returned status value
* @{
@@ -36,6 +40,18 @@
#define Q_FULL MSG_TIMEOUT /**< @brief Queue full, */
/** @} */
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
/**
* @brief Type of a generic I/O queue structure.
*/
@@ -69,6 +85,34 @@ struct io_queue {
};
/**
+ * @extends io_queue_t
+ *
+ * @brief Type of an input queue structure.
+ * @details This structure represents a generic asymmetrical input queue.
+ * Writing to the queue is non-blocking and can be performed from
+ * interrupt handlers or from within a kernel lock zone.
+ * Reading the queue can be a blocking operation and is supposed to
+ * be performed by a system thread.
+ */
+typedef io_queue_t input_queue_t;
+
+/**
+ * @extends io_queue_t
+ *
+ * @brief Type of an output queue structure.
+ * @details This structure represents a generic asymmetrical output queue.
+ * Reading from the queue is non-blocking and can be performed from
+ * interrupt handlers or from within a kernel lock zone.
+ * Writing the queue can be a blocking operation and is supposed to
+ * be performed by a system thread.
+ */
+typedef io_queue_t output_queue_t;
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
+
+/**
* @name Macro Functions
* @{
*/
@@ -107,25 +151,8 @@ struct io_queue {
* @special
*/
#define qGetLink(qp) ((qp)->q_link)
-/** @} */
/**
- * @extends io_queue_t
- *
- * @brief Type of an input queue structure.
- * @details This structure represents a generic asymmetrical input queue.
- * Writing to the queue is non-blocking and can be performed from
- * interrupt handlers or from within a kernel lock zone.
- * Reading the queue can be a blocking operation and is supposed to
- * be performed by a system thread.
- */
-typedef io_queue_t input_queue_t;
-
-/**
- * @name Macro Functions
- * @{
- */
-/**
* @brief Returns the filled space into an input queue.
*
* @param[in] iqp pointer to an @p input_queue_t structure
@@ -187,25 +214,8 @@ typedef io_queue_t input_queue_t;
* @api
*/
#define iqGet(iqp) iqGetTimeout(iqp, TIME_INFINITE)
-/** @} */
-
-/**
- * @extends io_queue_t
- *
- * @brief Type of an output queue structure.
- * @details This structure represents a generic asymmetrical output queue.
- * Reading from the queue is non-blocking and can be performed from
- * interrupt handlers or from within a kernel lock zone.
- * Writing the queue can be a blocking operation and is supposed to
- * be performed by a system thread.
- */
-typedef io_queue_t output_queue_t;
/**
- * @name Macro Functions
- * @{
- */
-/**
* @brief Returns the filled space into an output queue.
*
* @param[in] oqp pointer to an @p output_queue_t structure
@@ -269,6 +279,11 @@ typedef io_queue_t output_queue_t;
* @api
*/
#define oqPut(oqp, b) oqPutTimeout(oqp, b, TIME_INFINITE)
+/** @} */
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
/** @} */
#ifdef __cplusplus