aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/serial.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-03 09:51:01 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-03 09:51:01 +0000
commit62a6638eb544f2c3d9022bcb34cae181aa8f7aae (patch)
tree2824331e6e59e511963608603d65010d70ebf140 /src/include/serial.h
parenta8df5dfb84dc37224222520ead47d4cef40ebd9f (diff)
downloadChibiOS-62a6638eb544f2c3d9022bcb34cae181aa8f7aae.tar.gz
ChibiOS-62a6638eb544f2c3d9022bcb34cae181aa8f7aae.tar.bz2
ChibiOS-62a6638eb544f2c3d9022bcb34cae181aa8f7aae.zip
Added I/O queue checks to the channels, added notes in the readme, improved the FullDuplexDriver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@940 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/serial.h')
-rw-r--r--src/include/serial.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/serial.h b/src/include/serial.h
index 9bb6c4f92..08ddf61fe 100644
--- a/src/include/serial.h
+++ b/src/include/serial.h
@@ -137,6 +137,24 @@ extern "C" {
#endif
/**
+ * @brief Direct output check on a @p FullDuplexDriver.
+ * @details This function bypasses the indirect access to the channel and
+ * checks directly the output queue. This is faster but cannot
+ * be used to check different channels implementations.
+ * @see chIOPutWouldBlock()
+ */
+#define chFDDPutWouldBlock(sd) chOQIsFull(&(sd)->d2.oqueue)
+
+/**
+ * @brief Direct input check on a @p FullDuplexDriver.
+ * @details This function bypasses the indirect access to the channel and
+ * checks directly the input queue. This is faster but cannot
+ * be used to check different channels implementations.
+ * @see chIOGetWouldBlock()
+ */
+#define chFDDGetWouldBlock(sd) chIQIsEmpty(&(sd)->d2.iqueue)
+
+/**
* @brief Direct blocking write to a @p FullDuplexDriver.
* @details This function bypasses the indirect access to the channel and
* writes directly on the output queue. This is faster but cannot