Module: xenomai-abe
Branch: analogy
Commit: d474fbd60bcb800fde9360d3ecac94f5c589f996
URL:    
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=d474fbd60bcb800fde9360d3ecac94f5c589f996

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Sun Nov 22 23:53:43 2009 +0100

analogy: add error codes descriptions for range management routines

---

 src/drvlib/analogy/descriptor.c |   13 +++++++------
 src/drvlib/analogy/range.c      |   21 ++++++++++++++++++---
 2 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/src/drvlib/analogy/descriptor.c b/src/drvlib/analogy/descriptor.c
index a85d878..f841657 100644
--- a/src/drvlib/analogy/descriptor.c
+++ b/src/drvlib/analogy/descriptor.c
@@ -336,6 +336,7 @@ int a4l_close(a4l_desc_t * dsc)
  * - -EINVAL is returned if some argument is missing or wrong; the
  *    the dsc pointer should be checked; check also the kernel log
  *    ("dmesg")
+ * - -EFAULT is returned if a user <-> kernel transfer went wrong
  *
  */
 int a4l_fill_desc(a4l_desc_t * dsc)
@@ -363,8 +364,8 @@ int a4l_fill_desc(a4l_desc_t * dsc)
  *
  * - -EINVAL is returned if some argument is missing or wrong; subd
  *    and the dsc pointer should be checked; check also the kernel log
- *    ("dmesg")
- * - -EFAULT is returned if a user <-> kernel transfer went wrong
+ *    ("dmesg"); WARNING: a4l_fill_desc() should be called before
+ *    using a4l_get_subdinfo().
  *
  */
 int a4l_get_subdinfo(a4l_desc_t * dsc,
@@ -400,8 +401,8 @@ int a4l_get_subdinfo(a4l_desc_t * dsc,
  *
  * - -EINVAL is returned if some argument is missing or wrong; subd,
  *    chan and the dsc pointer should be checked; check also the
- *    kernel log ("dmesg")
- * - -EFAULT is returned if a user <-> kernel transfer went wrong
+ *    kernel log ("dmesg"); WARNING: a4l_fill_desc() should be called
+ *    before using a4l_get_chinfo()
  *
  */
 int a4l_get_chinfo(a4l_desc_t * dsc,
@@ -444,8 +445,8 @@ int a4l_get_chinfo(a4l_desc_t * dsc,
  *
  * - -EINVAL is returned if some argument is missing or wrong; subd,
  *    chan, rng and the dsc pointer should be checked; check also the
- *    kernel log ("dmesg")
- * - -EFAULT is returned if a user <-> kernel transfer went wrong
+ *    kernel log ("dmesg"); WARNING: a4l_fill_desc() should be called
+ *    before using a4l_get_rnginfo()
  *
  */
 int a4l_get_rnginfo(a4l_desc_t * dsc,
diff --git a/src/drvlib/analogy/range.c b/src/drvlib/analogy/range.c
index e12242c..ab41f1e 100644
--- a/src/drvlib/analogy/range.c
+++ b/src/drvlib/analogy/range.c
@@ -78,7 +78,12 @@ void data8_set(void *dst, lsampl_t val)
  * @param[in] max Maximal limit value
  * @param[out] rng Found range
  *
- * @return 0 on success, otherwise a negative error code.
+ * @return 0 on success. Otherwise:
+ *
+ * - -EINVAL is returned if some argument is missing or wrong;
+ *    idx_subd, idx_chan and the dsc pointer should be checked; check
+ *    also the kernel log ("dmesg"); WARNING: a4l_fill_desc() should
+ *    be called before using a4l_find_range()
  *
  */
 int a4l_find_range(a4l_desc_t * dsc,
@@ -147,7 +152,12 @@ out_get_range:
  * @param[in] cnt Count of conversion to perform
  *
  * @return the count of conversion performed, otherwise a negative
- * error code.
+ * error code:
+ *
+ * - -EINVAL is returned if some argument is missing or wrong;
+ *    chan, rng and the pointers should be checked; check also the
+ *    kernel log ("dmesg"); WARNING: a4l_fill_desc() should be called
+ *    before using a4l_to_phys()
  *
  */
 int a4l_to_phys(a4l_chinfo_t * chan,
@@ -213,7 +223,12 @@ int a4l_to_phys(a4l_chinfo_t * chan,
  * @param[in] cnt Count of conversion to perform
  *
  * @return the count of conversion performed, otherwise a negative
- * error code.
+ * error code:
+ *
+ * - -EINVAL is returned if some argument is missing or wrong;
+ *    chan, rng and the pointers should be checked; check also the
+ *    kernel log ("dmesg"); WARNING: a4l_fill_desc() should be called
+ *    before using a4l_from_phys()
  *
  */
 int a4l_from_phys(a4l_chinfo_t * chan,


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to