[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MCP750 PCI



Till Straumann writes:
 > gregory.menke at gsfc.nasa.gov wrote:
 > >           {
 > >                case 16:
 > >                   v = (unsigned int) ld_le16((unsigned short *) base+reg[i].offset );
 > >                   break;
 > >                case 32:
 > >                   v = (unsigned int) ld_le32((unsigned int *) base+reg[i].offset );
 > >                   break;
 > >                default:
 > >                   printf("unsupported register width %i\n", devregion->width );
 > >                   v= 0;
 > >             }
 > 
 > Hmm - Gregory,
 > 
 > shouldn't that be
 > 
 > ld_le16((unsigned short*)( base + offset ));
 > 
 > etc. ???
 > 

Of course that was the problem... Thanks!  Stupid operator precedence
gets me every time.  I only looked that code over maybe 50 times.
Sheesh!

Gregm