diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-07 08:11:03 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-07 08:11:03 +0000 |
commit | bec915e05274a94f2b1a5e2443f04de826dd1f6e (patch) | |
tree | cec2044911766f5dc5a7bd8b8c9ffe0fe81734f8 /os/hal/include/serial.h | |
parent | 4afa0b98dff9eac6a94c104acf900e15147d2da3 (diff) | |
parent | b43c71424d201583822b26d13d11f7e3634cb515 (diff) | |
download | ChibiOS-bec915e05274a94f2b1a5e2443f04de826dd1f6e.tar.gz ChibiOS-bec915e05274a94f2b1a5e2443f04de826dd1f6e.tar.bz2 ChibiOS-bec915e05274a94f2b1a5e2443f04de826dd1f6e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6916 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/serial.h')
-rw-r--r-- | os/hal/include/serial.h | 28 |
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)
/** @} */
/*===========================================================================*/
|