From: <ro...@us...> - 2010-04-02 10:35:44
|
Revision: 2291 http://nscldaq.svn.sourceforge.net/nscldaq/?rev=2291&view=rev Author: ron-fox Date: 2010-04-02 10:35:26 +0000 (Fri, 02 Apr 2010) Log Message: ----------- Got the CC1205 tested to work. Modified Paths: -------------- trunk/ccusb/ccusbReadout/configure.in trunk/ccusb/ccusbReadout/daqconfig/CConfiguration.cpp trunk/ccusb/ccusbReadout/devices/CC1205.cpp Modified: trunk/ccusb/ccusbReadout/configure.in =================================================================== --- trunk/ccusb/ccusbReadout/configure.in 2010-03-26 17:36:14 UTC (rev 2290) +++ trunk/ccusb/ccusbReadout/configure.in 2010-04-02 10:35:26 UTC (rev 2291) @@ -8,7 +8,7 @@ # Separate device libraries. -AM_INIT_AUTOMAKE(ccusbReadout, 1.2-004) +AM_INIT_AUTOMAKE(ccusbReadout, 1.2-005) # # The variable below should track the Modified: trunk/ccusb/ccusbReadout/daqconfig/CConfiguration.cpp =================================================================== --- trunk/ccusb/ccusbReadout/daqconfig/CConfiguration.cpp 2010-03-26 17:36:14 UTC (rev 2290) +++ trunk/ccusb/ccusbReadout/daqconfig/CConfiguration.cpp 2010-04-02 10:35:26 UTC (rev 2291) @@ -28,7 +28,10 @@ #include <CLRS2551Command.h> #include <CLRS2249Command.h> #include <CLRS2228Command.h> +#include <C1205Command.h> +#include <CCAEN257Command.h> + #include <tcl.h> #include <algorithm> @@ -61,6 +64,8 @@ m_Commands.push_back(new CLRS2551Command(*m_pInterp, *this)); m_Commands.push_back(new CLRS2249Command(*m_pInterp, *this)); m_Commands.push_back(new CLRS2228Command(*m_pInterp, *this)); + m_Commands.push_back(new C1205Command(*m_pInterp, *this)); + m_Commands.push_back(new CCAEN257Command(*m_pInterp, *this)); } /*! Modified: trunk/ccusb/ccusbReadout/devices/CC1205.cpp =================================================================== --- trunk/ccusb/ccusbReadout/devices/CC1205.cpp 2010-03-26 17:36:14 UTC (rev 2290) +++ trunk/ccusb/ccusbReadout/devices/CC1205.cpp 2010-04-02 10:35:26 UTC (rev 2291) @@ -220,7 +220,7 @@ // If the valid values have not yet been set, set them up: if(rangeValues.empty()) { - for(const enumValues* pRange = RangeModes; *pRange->s_pName != 0; pRange++) { + for(const enumValues* pRange = RangeModes; pRange->s_pName != 0; pRange++) { string rangeName(pRange->s_pName); rangeValues.insert(rangeName); } @@ -326,7 +326,8 @@ // that removes the Q rather than being the last one with Q valid. // the next list item adds a 'fake' trailer word. - list.addMarker24(0x00c00000); + list.addMarker(0x00ff); // Low 16 bits. + list.addMarker(0x0040); // Top 16 bits. } @@ -390,7 +391,14 @@ if (!getBoolParameter("-hires")) { reg |= LORESMode; } - + + // Fold in the bottom 8 bits of the -id: + + uint32_t id = getIntegerParameter("-id"); + reg |= (id & 0xff); + + cout << hex << " Control register: " << reg << endl << dec; + return reg; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |