Boron: Switching off VUSB from code?

Hi there,
On the Boron, I’m wondering if it’s possible to switch off VUSB from code so that the Boron stays on (drawing power from battery), but no current is drawn from VUSB at all?
I.e is it possible to make VUSB behave like an open circuit / very high impedance?
Is there an internal MOSFET, or a register in the PMIC that controls this?
Thanks!

One possible way could be by setting the EN_HIZ bit of REG00 in the PMIC (BQ24195). The datasheet seems to indicate that the current through VBUS is less than 30uA when the PMIC is in HIZ mode.

This is the code I have at the moment. Very unsure if this is the correct way to go about things so any feedback would be greatly appreciated!

There are some nuances that I haven’t properly thought through. I think the PMIC needs to be in host mode for it to stay in HIZ mode and not automatically clear EN_HIZ. Also, I’m not sure what role the watchdog plays in all this, and whether/in what way the Particle OS is going to interfere with these settings.

void turnOffVUSB(){
  PMIC pmic;
  pmic.lock();
  delay(2000);
  pmic.begin();
  pmic.disableWatchdog(); //?
  delay(2000);
  Wire1.begin();
  Wire1.beginTransmission(PMIC_ADDRESS);
  Wire1.write(0x0);
  byte DATA = 0b10110000;
  Wire1.write(DATA);
  Wire1.endTransmission(true);
  pmic.unlock();
  }

  void turnOnVUSB(){
  PMIC pmic;
  pmic.lock();
  delay(1000);
  pmic.begin();
  pmic.disableWatchdog(); //?
  delay(100);
  Wire1.begin();
  Wire1.beginTransmission(PMIC_ADDRESS);
  Wire1.write(0x0);
  byte DATA = 0b00110000;
  Wire1.write(DATA);
  Wire1.endTransmission(true);
  pmic.unlock();
  }