From: David Schleef Date: Fri, 1 Dec 2000 19:07:28 +0000 (+0000) Subject: error message cleanup X-Git-Tag: r0_7_52~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c0dc37c65d44401196a3ecf08d97429fda18534a;p=comedi.git error message cleanup --- diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index f3ef51f4..382162c3 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -52,8 +52,8 @@ */ //#define USE_TRIG -#define DEBUG_INTERRUPT -#define TRY_DMA +//#define DEBUG_INTERRUPT +//#define TRY_DMA #include <8255.h> @@ -231,7 +231,9 @@ printk("mite status=0x%08x\n",readw(devpriv->mite->mite_io_addr+0x14)); #endif if(status&(AI_Overrun_St|AI_Overflow_St)){ + printk("ni_mio_common: error "); ni_mio_print_status_a(status); + printk("\n"); win_out(0x0000,Interrupt_A_Enable_Register); comedi_done(dev,s); return; @@ -241,14 +243,15 @@ printk("mite status=0x%08x\n",readw(devpriv->mite->mite_io_addr+0x14)); #ifdef DEBUG_INTERRUPT printk("ni-E: SC_TC interrupt\n"); #endif -#if 0 - if(s->cur_trig.n){ /* XXX fix */ +#ifdef TRY_DMA + ni_handle_block(dev); +#else + if(!devpriv->n_left){ ni_handle_fifo_dregs(dev); win_out(0x0000,Interrupt_A_Enable_Register); comedi_done(dev,s); } #endif - ni_handle_block(dev); ack|=AI_SC_TC_Interrupt_Ack; } @@ -898,6 +901,9 @@ static int ni_ai_cmd(comedi_device *dev,comedi_subdevice *s) /* load SC (Scan Count) */ win_out(AI_SC_Load,AI_Command_1_Register); +/* hack */ +devpriv->n_left = 0; + break; case TRIG_NONE: /* stage number of scans */ @@ -910,6 +916,9 @@ static int ni_ai_cmd(comedi_device *dev,comedi_subdevice *s) /* load SC (Scan Count) */ win_out(AI_SC_Load,AI_Command_1_Register); +/* hack */ +devpriv->n_left = 1; + break; } #else diff --git a/comedi/drivers/ni_mio_cs.c b/comedi/drivers/ni_mio_cs.c index 6903cdb6..a6a5bd50 100644 --- a/comedi/drivers/ni_mio_cs.c +++ b/comedi/drivers/ni_mio_cs.c @@ -76,7 +76,7 @@ static ni_board ni_boards[]={ ai_fifo_depth: 1024, alwaysdither: 0, gainlkup: ai_gain_16, - ai_speed: 50000, + ai_speed: 5000, n_aochan: 0, aobits: 0, ao_fifo_depth: 0,