How can I print out this Union/Struct for debugging?

I am working with this INA260 library. In the Advanced Example I find this:

 // create an instance of the register structure. note the ={0} used
  // to zero-initialize the instance. You could also use memset() or
  // manually initialize all of the fields to zero. All of the fields
  // are written to the config. register so you want to make sure you
  // know what they're all set to.
  INA260::ConfigurationRegister configReg = {0};
  
  configReg.mode   = INA260::MODE_ISH_VBUS_CONTINUOUS;  // continuously sample voltage and current (this is default)
  configReg.ishct  = INA260::ISHCT_1_1MS;               // allow 2.116ms also for the ADC sampling of the current
  configReg.vbusct = INA260::VBUSCT_1_1MS;              // allow 2.116ms for the ADC sampling of the bus voltage
  configReg.avg    = INA260::AVG_16;                    // average 64 samples for each reading
  
  ina260.writeConfigurationRegister(configReg);         //Write the configuration register to the INA260 over I2C

... and this, I think, is the relevant section from INA260.h:

  union ConfigurationRegister {
    struct __attribute__((packed)) {
      uint16_t mode : 3;
      uint16_t ishct : 3;
      uint16_t vbusct : 3;
      uint16_t avg : 3;
      uint16_t : 3;
      uint16_t rst : 1;
    };
    uint16_t rawValue;
  };

... which is mapping to this hardware:

How do I print (in binary format) this structure to see if I am doing what I think I am?

Regards, M.

The easiest would be to just print the union integer in hex format.

Serial.pront(rawValue, HEX):

a7

Thanks A7,

But...

/Ammeter_esp8266_INA260/Ammeter_esp8266_INA260.ino: In function 'void setup()':
Ammeter_esp8266_INA260:77:16: error: 'rawValue' was not declared in this scope
   77 | Serial.println(rawValue, HEX);
      |                ^~~~~~~~
exit status 1
'rawValue' was not declared in this scope

Maybe:

Serial.println( configReg.rawValue, HEX );

Sry, for sure more like that.

a7

Thank you both. I'm on my way again...

Regards, M.