Skip to content

Commit

Permalink
feat: Upgrade of the "printregisters" EVG function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzyjamroz committed Oct 1, 2024
1 parent ae841e0 commit d57694c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
21 changes: 15 additions & 6 deletions evgMrmApp/src/evgInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,16 +840,25 @@ printregisters(volatile epicsUInt8 *evg) {
for(reg=0; reg<NELEMENTS(printreg); reg++){
switch(printreg[reg].rsize){
case 8:
printf("%16s: %02x\n", printreg[reg].label,
ioread8(evg+printreg[reg].offset));
printf("0x%05x %02x %-16s\n",
printreg[reg].offset,
ioread8(evg+printreg[reg].offset),
printreg[reg].label
);
break;
case 16:
printf("%16s: %04x\n", printreg[reg].label,
nat_ioread16(evg+printreg[reg].offset));
printf("0x%05x %04x %-16s\n",
printreg[reg].offset,
nat_ioread16(evg+printreg[reg].offset),
printreg[reg].label
);
break;
case 32:
printf("%16s: %08x\n", printreg[reg].label,
nat_ioread32(evg+printreg[reg].offset));
printf("0x%05x %08x %-16s\n",
printreg[reg].offset,
nat_ioread32(evg+printreg[reg].offset),
printreg[reg].label
);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion evgMrmApp/src/evgRegMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
//=====================
// Backplane Output Mapping Register Array
//
#define U16_BackOutMap_base 0x0424 // Backplane Output Port Mapping Register Offset
#define U16_BackOutMap_base 0x0420 // Backplane Output Port Mapping Register Offset
#define U16_BackOutMap(n) (U16_BackOutMap_base + (2*(n)))

//=====================
Expand Down

0 comments on commit d57694c

Please sign in to comment.