NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member spg
Member
spg
Posts: 51
0 Kudos

bug fix for NI tCHInChDMAChannel code

 

ran into a hard-to-find bug in the x-series DDK, you guys might want to correct.

 

in the routine:

 

   void tCHInChDMAChannel::_config(nMDBG::tStatus2& status)

near the bottom of the routine is:

      _readIdx  = 0;

      _writeIdx = 0;

 

there is one more line you need in there:

 

      _lastwriteIdx = 0;

 

this doesn't cause a problem for any of the sample programs, since they only use tCHInChDMAChannel once and dispose of it.  however if you start() the channel for a second time without doing a reset (to avoid a buffer re-allocation), the object will incorrectly report the number of bytes available.

 

 

--spg


 

------------------
scott gillespie
applied brain, inc.
------------------
Active Participant
Steven_T
Posts: 543
0 Kudos

Re: bug fix for NI tCHInChDMAChannel code

Hello Scott,

 

Thanks for letting us know about this.  According to the comments in that file, we expected to be able to stop the dma channel and start it back up.

 

Steven T.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page