mythen3, reading dr back fix

This commit is contained in:
maliakal_d 2019-11-11 18:33:59 +01:00
parent 2fff9f5bfe
commit 206041989f
2 changed files with 2 additions and 2 deletions

View File

@ -444,7 +444,7 @@ int setDynamicRange(int dr){
bus_w(CONFIG_REG, bus_r(CONFIG_REG) | regval); bus_w(CONFIG_REG, bus_r(CONFIG_REG) | regval);
} }
uint32_t regval = bus_r(CONFIG_REG & CONFIG_DYNAMIC_RANGE_MSK); uint32_t regval = bus_r(CONFIG_REG) & CONFIG_DYNAMIC_RANGE_MSK;
switch(regval) { switch(regval) {
case CONFIG_DYNAMIC_RANGE_1_VAL: case CONFIG_DYNAMIC_RANGE_1_VAL:
return 1; return 1;
@ -775,7 +775,7 @@ uint64_t readPatternWord(int addr) {
return -1; return -1;
} }
FILE_LOG(logINFORED, (" Reading Pattern Word (addr:0x%x)\n", addr)); FILE_LOG(logINFO, (" Reading Pattern Word (addr:0x%x)\n", addr));
uint32_t reg_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2; // the first word in RAM as base plus the offset of the word to write (addr) uint32_t reg_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2; // the first word in RAM as base plus the offset of the word to write (addr)
uint32_t reg_msb = PATTERN_STEP0_MSB_REG + addr * REG_OFFSET * 2; uint32_t reg_msb = PATTERN_STEP0_MSB_REG + addr * REG_OFFSET * 2;