aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/serial.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/include/serial.h')
-rw-r--r--os/hal/include/serial.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/os/hal/include/serial.h b/os/hal/include/serial.h
index 213a3c132..8ea2248bd 100644
--- a/os/hal/include/serial.h
+++ b/os/hal/include/serial.h
@@ -79,10 +79,6 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if !CH_USE_QUEUES && !CH_USE_EVENTS
-#error "Serial Driver requires CH_USE_QUEUES and CH_USE_EVENTS"
-#endif
-
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
@@ -149,7 +145,7 @@ struct SerialDriver {
*
* @api
*/
-#define sdPutWouldBlock(sdp) chOQIsFullI(&(sdp)->oqueue)
+#define sdPutWouldBlock(sdp) oqIsFullI(&(sdp)->oqueue)
/**
* @brief Direct input check on a @p SerialDriver.
@@ -161,7 +157,7 @@ struct SerialDriver {
*
* @api
*/
-#define sdGetWouldBlock(sdp) chIQIsEmptyI(&(sdp)->iqueue)
+#define sdGetWouldBlock(sdp) iqIsEmptyI(&(sdp)->iqueue)
/**
* @brief Direct write to a @p SerialDriver.
@@ -173,7 +169,7 @@ struct SerialDriver {
*
* @api
*/
-#define sdPut(sdp, b) chOQPut(&(sdp)->oqueue, b)
+#define sdPut(sdp, b) oqPut(&(sdp)->oqueue, b)
/**
* @brief Direct write to a @p SerialDriver with timeout specification.
@@ -185,7 +181,7 @@ struct SerialDriver {
*
* @api
*/
-#define sdPutTimeout(sdp, b, t) chOQPutTimeout(&(sdp)->oqueue, b, t)
+#define sdPutTimeout(sdp, b, t) oqPutTimeout(&(sdp)->oqueue, b, t)
/**
* @brief Direct read from a @p SerialDriver.
@@ -197,7 +193,7 @@ struct SerialDriver {
*
* @api
*/
-#define sdGet(sdp) chIQGet(&(sdp)->iqueue)
+#define sdGet(sdp) iqGet(&(sdp)->iqueue)
/**
* @brief Direct read from a @p SerialDriver with timeout specification.
@@ -209,7 +205,7 @@ struct SerialDriver {
*
* @api
*/
-#define sdGetTimeout(sdp, t) chIQGetTimeout(&(sdp)->iqueue, t)
+#define sdGetTimeout(sdp, t) iqGetTimeout(&(sdp)->iqueue, t)
/**
* @brief Direct blocking write to a @p SerialDriver.
@@ -222,7 +218,7 @@ struct SerialDriver {
* @api
*/
#define sdWrite(sdp, b, n) \
- chOQWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE)
+ oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE)
/**
* @brief Direct blocking write to a @p SerialDriver with timeout
@@ -236,7 +232,7 @@ struct SerialDriver {
* @api
*/
#define sdWriteTimeout(sdp, b, n, t) \
- chOQWriteTimeout(&(sdp)->oqueue, b, n, t)
+ oqWriteTimeout(&(sdp)->oqueue, b, n, t)
/**
* @brief Direct non-blocking write to a @p SerialDriver.
@@ -249,7 +245,7 @@ struct SerialDriver {
* @api
*/
#define sdAsynchronousWrite(sdp, b, n) \
- chOQWriteTimeout(&(sdp)->oqueue, b, n, TIME_IMMEDIATE)
+ oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_IMMEDIATE)
/**
* @brief Direct blocking read from a @p SerialDriver.
@@ -262,7 +258,7 @@ struct SerialDriver {
* @api
*/
#define sdRead(sdp, b, n) \
- chIQReadTimeout(&(sdp)->iqueue, b, n, TIME_INFINITE)
+ iqReadTimeout(&(sdp)->iqueue, b, n, TIME_INFINITE)
/**
* @brief Direct blocking read from a @p SerialDriver with timeout
@@ -276,7 +272,7 @@ struct SerialDriver {
* @api
*/
#define sdReadTimeout(sdp, b, n, t) \
- chIQReadTimeout(&(sdp)->iqueue, b, n, t)
+ iqReadTimeout(&(sdp)->iqueue, b, n, t)
/**
* @brief Direct non-blocking read from a @p SerialDriver.
@@ -289,7 +285,7 @@ struct SerialDriver {
* @api
*/
#define sdAsynchronousRead(sdp, b, n) \
- chIQReadTimeout(&(sdp)->iqueue, b, n, TIME_IMMEDIATE)
+ iqReadTimeout(&(sdp)->iqueue, b, n, TIME_IMMEDIATE)
/** @} */
/*===========================================================================*/