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

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Tue Dec 29 00:19:49 2009 +0100

analogy: add some debug traces in the fake driver

---

 ksrc/drivers/analogy/testing/fake.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ksrc/drivers/analogy/testing/fake.c 
b/ksrc/drivers/analogy/testing/fake.c
index 9ec3852..090f109 100644
--- a/ksrc/drivers/analogy/testing/fake.c
+++ b/ksrc/drivers/analogy/testing/fake.c
@@ -250,6 +250,8 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
        a4l_subd_t *subd;
        tstprv_t *priv = (tstprv_t *)dev->priv;
 
+       a4l_dbg(1, drv_dbg, dev, "starting attach procedure...\n");
+
        if(arg->opts!=NULL) {
                tstattr_t *attr = (tstattr_t*) arg->opts;
 
@@ -263,6 +265,11 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
                priv->quanta_cnt = 1;
        }
 
+       a4l_dbg(1, drv_dbg, dev, 
+               "amplitude divisor = %lu...\n", priv->amplitude_div);
+       a4l_dbg(1, drv_dbg, dev, 
+               "quanta count = %lu...\n", priv->quanta_cnt);
+
        /* Adds the subdevice to the device */
        subd = a4l_alloc_subd(0, setup_test_subd);
        if(subd == NULL)
@@ -272,6 +279,8 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
        if(ret != TEST_INPUT_SUBD)
                return (ret < 0) ? ret : -EINVAL;
 
+       a4l_dbg(1, drv_dbg, dev, "AI subdevice registered\n");
+
        priv->timer_running = 0;
 
        ret = a4l_task_init(&priv->timer_task, 
@@ -279,6 +288,8 @@ int test_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
                            test_task_proc, 
                            dev, A4L_TASK_HIGHEST_PRIORITY);
 
+       a4l_dbg(1, drv_dbg, dev, "attach procedure complete\n");
+
        return ret;
 }
 
@@ -289,6 +300,8 @@ int test_detach(a4l_dev_t *dev)
 
        a4l_task_destroy(&priv->timer_task);
 
+       a4l_dbg(1, drv_dbg, dev, "detach procedure complete\n");
+
        return 0;
 }
 


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

Reply via email to