aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-10-31 13:21:07 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-10-31 13:21:07 +0000
commit749edc4e23635a6f317ed92041e24a3add0292b4 (patch)
tree32df445ddf54331fb6a275c7f3c6b05224b6ccb3 /os
parent70a880a4d4e1ba03d71e369e3d9871a8d04f23b3 (diff)
downloadChibiOS-749edc4e23635a6f317ed92041e24a3add0292b4.tar.gz
ChibiOS-749edc4e23635a6f317ed92041e24a3add0292b4.tar.bz2
ChibiOS-749edc4e23635a6f317ed92041e24a3add0292b4.zip
Added I-class functions to the serial driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10919 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/include/hal_serial.h61
1 files changed, 39 insertions, 22 deletions
diff --git a/os/hal/include/hal_serial.h b/os/hal/include/hal_serial.h
index 2a0925658..2276a49c8 100644
--- a/os/hal/include/hal_serial.h
+++ b/os/hal/include/hal_serial.h
@@ -140,7 +140,15 @@ struct SerialDriver {
* writes directly on the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnPutTimeout()
+ * @iclass
+ */
+#define sdPutI(sdp, b) oqPutI(&(sdp)->oqueue, b)
+
+/**
+ * @brief Direct write to a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * writes directly on the output queue. This is faster but cannot
+ * be used to write to different channels implementations.
*
* @api
*/
@@ -152,8 +160,6 @@ struct SerialDriver {
* writes directly on the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnPutTimeout()
- *
* @api
*/
#define sdPutTimeout(sdp, b, t) oqPutTimeout(&(sdp)->oqueue, b, t)
@@ -164,7 +170,15 @@ struct SerialDriver {
* reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnGetTimeout()
+ * @iclass
+ */
+#define sdGetI(sdp) iqGetI(&(sdp)->iqueue)
+
+/**
+ * @brief Direct read from a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * reads directly from the input queue. This is faster but cannot
+ * be used to read from different channels implementations.
*
* @api
*/
@@ -176,8 +190,6 @@ struct SerialDriver {
* reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnGetTimeout()
- *
* @api
*/
#define sdGetTimeout(sdp, t) iqGetTimeout(&(sdp)->iqueue, t)
@@ -188,12 +200,19 @@ struct SerialDriver {
* writes directly to the output queue. This is faster but cannot
* be used to write from different channels implementations.
*
- * @see chnWrite()
+ * @iclass
+ */
+#define sdWriteI(sdp, b, n) oqWriteI(&(sdp)->oqueue, b, n)
+
+/**
+ * @brief Direct blocking write to a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * writes directly to the output queue. This is faster but cannot
+ * be used to write from different channels implementations.
*
* @api
*/
-#define sdWrite(sdp, b, n) \
- oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE)
+#define sdWrite(sdp, b, n) oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE)
/**
* @brief Direct blocking write to a @p SerialDriver with timeout
@@ -202,8 +221,6 @@ struct SerialDriver {
* writes directly to the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnWriteTimeout()
- *
* @api
*/
#define sdWriteTimeout(sdp, b, n, t) \
@@ -215,8 +232,6 @@ struct SerialDriver {
* writes directly to the output queue. This is faster but cannot
* be used to write to different channels implementations.
*
- * @see chnWriteTimeout()
- *
* @api
*/
#define sdAsynchronousWrite(sdp, b, n) \
@@ -228,12 +243,19 @@ struct SerialDriver {
* reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnRead()
+ * @iclass
+ */
+#define sdReadI(sdp, b, n) iqReadI(&(sdp)->iqueue, b, n, TIME_INFINITE)
+
+/**
+ * @brief Direct blocking read from a @p SerialDriver.
+ * @note This function bypasses the indirect access to the channel and
+ * reads directly from the input queue. This is faster but cannot
+ * be used to read from different channels implementations.
*
* @api
*/
-#define sdRead(sdp, b, n) \
- iqReadTimeout(&(sdp)->iqueue, b, n, TIME_INFINITE)
+#define sdRead(sdp, b, n) iqReadTimeout(&(sdp)->iqueue, b, n, TIME_INFINITE)
/**
* @brief Direct blocking read from a @p SerialDriver with timeout
@@ -242,12 +264,9 @@ struct SerialDriver {
* reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnReadTimeout()
- *
* @api
*/
-#define sdReadTimeout(sdp, b, n, t) \
- iqReadTimeout(&(sdp)->iqueue, b, n, t)
+#define sdReadTimeout(sdp, b, n, t) iqReadTimeout(&(sdp)->iqueue, b, n, t)
/**
* @brief Direct non-blocking read from a @p SerialDriver.
@@ -255,8 +274,6 @@ struct SerialDriver {
* reads directly from the input queue. This is faster but cannot
* be used to read from different channels implementations.
*
- * @see chnReadTimeout()
- *
* @api
*/
#define sdAsynchronousRead(sdp, b, n) \