diff options
Diffstat (limited to 'os/hal/include/hal_queues.h')
-rw-r--r-- | os/hal/include/hal_queues.h | 83 |
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
|