XIAO BLE Sense battery level and charging status

I found a symbol about VBATT in valiant…cpp file.

// VBAT
{ P0_14, NULL, NULL, NULL }, // D31/VBAT_ENABLE
{ P0_31, NULL, NULL, NULL }, // D32/VBAT_READ

So, We can use VBAT_ENABLE with this statement.

#define PIN_VBATENABLE (31u) // this is not defined in pins_arduino.h file.

pinMode(PIN_VBATENABLE, OUTPUT);
digitalWrite(PIN_VBATENABLE, LOW);