2 x changes to hal_buffers (1 bug, 1 add) Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
FXCoder
Posts: 384
Joined: Sun Jun 12, 2016 4:10 am
Location: Sydney, Australia
Has thanked: 180 times
Been thanked: 130 times

2 x changes to hal_buffers (1 bug, 1 add)

Postby FXCoder » Mon Sep 10, 2018 2:27 am

#1 Documentation fix in hal_buffers.c relating to output queue use case
#2 Add bqSetLinkX to allow updating of user defined link (same functionality that was added to hal_queues)

Code: Select all

Index: include/hal_buffers.h
===================================================================
--- include/hal_buffers.h   (revision 12246)
+++ include/hal_buffers.h   (working copy)
@@ -175,6 +175,16 @@
 #define bqGetLinkX(bqp) ((bqp)->link)
 
 /**
+ * @brief   Sets the queue application-defined link.
+ *
+ * @param[in] bqp       pointer to an @p io_buffers_queue_t structure
+ * @param[in] lk        The application-defined link.
+ *
+ * @special
+ */
+#define bqSetLinkX(bqp, lk) ((bqp)->link = lk)
+
+/**
  * @brief   Return the suspended state of the queue.
  *
  * @param[in] bqp       pointer to an @p io_buffers_queue_t structure
Index: src/hal_buffers.c
===================================================================
--- src/hal_buffers.c   (revision 12246)
+++ src/hal_buffers.c   (working copy)
@@ -28,7 +28,7 @@
  *          - <b>Input queue</b>, unidirectional queue where the writer is the
  *            ISR side and the reader is the thread side.
  *          - <b>Output queue</b>, unidirectional queue where the writer is the
- *            ISR side and the reader is the thread side.
+ *            thread side and the reader is the ISR side.
  *          - <b>Full duplex queue</b>, bidirectional queue. Full duplex queues
  *            are implemented by pairing an input queue and an output queue
  *            together.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: 2 x changes to hal_buffers (1 bug, 1 add)  Topic is solved

Postby Giovanni » Sat Oct 27, 2018 12:42 pm

Changes committed, thanks.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 16 guests