mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-12-02 11:17:46 +01:00
split reg for dsamples and asamples
This commit is contained in:
1 parent
de66054dff
commit
c77caecc31
2 files changed
+5
-12
No files matched your search
@@ -426,12 +426,8 @@
|
||||
#define PATTERN_LOOP_ADDR_STP_MSK (0x00001FFF << PATTERN_LOOP_ADDR_STP_OFST)
|
||||
|
||||
/* Samples RW register */
|
||||
#define SAMPLES_REG (0x32 << MEM_MAP_SHIFT)
|
||||
|
||||
#define SAMPLES_DIGITAL_OFST (0)
|
||||
#define SAMPLES_DIGITAL_MSK (0x0000FFFF << SAMPLES_DIGITAL_OFST)
|
||||
#define SAMPLES_ANALOG_OFST (16)
|
||||
#define SAMPLES_ANALOG_MSK (0x0000FFFF << SAMPLES_ANALOG_OFST)
|
||||
#define DBIT_NSAMPLES_REG (0x32 << MEM_MAP_SHIFT)
|
||||
#define ADC_NSAMPLES_REG (0x35 << MEM_MAP_SHIFT)
|
||||
|
||||
/** Power RW register */
|
||||
#define POWER_REG (0x33 << MEM_MAP_SHIFT)
|
||||
|
||||
@@ -1029,9 +1029,7 @@ int setNumAnalogSamples(int val) {
|
||||
}
|
||||
LOG(logINFO, ("Setting number of analog samples %d\n", val));
|
||||
naSamples = val;
|
||||
bus_w(SAMPLES_REG, bus_r(SAMPLES_REG) & ~SAMPLES_ANALOG_MSK);
|
||||
bus_w(SAMPLES_REG, bus_r(SAMPLES_REG) |
|
||||
((val << SAMPLES_ANALOG_OFST) & SAMPLES_ANALOG_MSK));
|
||||
bus_w(ADC_NSAMPLES_REG,val);
|
||||
|
||||
// 1Gb
|
||||
if (!enableTenGigabitEthernet(-1)) {
|
||||
@@ -1051,9 +1049,8 @@ int setNumDigitalSamples(int val) {
|
||||
}
|
||||
LOG(logINFO, ("Setting number of digital samples %d\n", val));
|
||||
ndSamples = val;
|
||||
bus_w(SAMPLES_REG, bus_r(SAMPLES_REG) & ~SAMPLES_DIGITAL_MSK);
|
||||
bus_w(SAMPLES_REG, bus_r(SAMPLES_REG) | ((val << SAMPLES_DIGITAL_OFST) &
|
||||
SAMPLES_DIGITAL_MSK));
|
||||
bus_w(DBIT_NSAMPLES_REG,val);
|
||||
|
||||
// 1Gb
|
||||
if (!enableTenGigabitEthernet(-1)) {
|
||||
if (updateDatabytesandAllocateRAM() == FAIL) {
|
||||
|
||||
Reference in new issue
Block a user