From: Tim Ousley Date: Mon, 7 May 2001 20:11:17 +0000 (+0000) Subject: continuous analog acquisition using MITE... X-Git-Tag: r0_7_59~67 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=184274bda3fd89971266ea8b36075cd2d99ddc09;p=comedi.git continuous analog acquisition using MITE... --- diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index b5c9f2f7..2cc5948e 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -60,7 +60,6 @@ #include #include #include -#include #include @@ -294,7 +293,7 @@ void mite_dma_prep(struct mite_struct *mite,comedi_subdevice *s) */ unsigned long mite_ll_from_kvmem(struct mite_struct *mite,comedi_async *async,int len) { - int i,size_so_far; + int i,size_so_far, continuous_aq; unsigned long nup; unsigned long prealloc_buf,prealloc_bufsz; //comedi_subdevice *s; @@ -308,6 +307,11 @@ unsigned long mite_ll_from_kvmem(struct mite_struct *mite,comedi_async *async,in prealloc_buf=(unsigned long)async->prealloc_buf; prealloc_bufsz=async->prealloc_bufsz; + continuous_aq = (async->cmd.stop_src == TRIG_NONE? 1:0); + if(continuous_aq) { + len = prealloc_bufsz; + } + //len = min(cmd->scan_end_arg*cmd->stop_arg*sizeof(sampl_t), async->data_len); if(async->data_lenComedi Error: preallocated DMA buffer is too small to hold the samples."); @@ -332,7 +336,14 @@ unsigned long mite_ll_from_kvmem(struct mite_struct *mite,comedi_async *async,in To make a looping ring for continuous acquisition, mite->ring[i-1].next = virt_to_bus(mite->ring); */ - mite->ring[i].count=0; + //mite->ring[i].count=0; + + if (continuous_aq&&(i>0)) { + mite->ring[i-1].next = virt_to_bus(mite->ring+0); + }else { + mite->ring[i].count=0; + } + MDPRINTK("i was %d, size_so_far was %d\n",i,size_so_far); if(size_so_far