next up previous
Next: HDMC Bitfield Access (2) Up: l1joint_0330_hdmc Previous: C++ Access to Parts

HDMC Bitfield Access (1)



Typical Register Configuration Entry

MyReg {
  1 { SingleBit }
  4 { FourBitField }
  2 { BitMenu Value { 0x0 { ItemOne }
                      0x1 { ItemTwo }
                      0x3 { ItemThree }
                    } }
}



Desired Calling Syntax in C++

MyReg *myreg;
int value = myreg->SingleBit();
int value = myreg->FourBitField();
int value = myreg->BitMenu();
int oldvalue = myreg->SingleBit(1);
int oldvalue = myreg->FourBitField(6);
int oldvalue = myreg->BitMenu(MyReg::ItemTwo);



Murrough Landon (m.p.j.landon@qmw.ac.uk)