This is the function from the library:
void heltec_deep_sleep(int seconds = 0) {
#ifdef WiFi_h
WiFi.disconnect(true);
#endif
#ifndef HELTEC_NO_DISPLAY_INSTANCE
display.displayOff();
#endif
#ifndef HELTEC_NO_RADIO_INSTANCE
// It seems to make no sense to do a .begin() here, but in case the radio is
// not interacted with at all before sleep, it will not respond to just
// .sleep() and then consumes 800 µA more than it should in deep sleep.
radio.begin();
// 'false' here is to not have a warm start, we re-init the after sleep.
radio.sleep(false);
#endif
// Turn off external power
heltec_ve(false);
// Turn off LED
heltec_led(0);
// Set all pins to input to save power
pinMode(VBAT_CTRL, INPUT);
pinMode(VBAT_ADC, INPUT);
pinMode(DIO1, INPUT);
pinMode(RST_LoRa, INPUT);
pinMode(BUSY_LoRa, INPUT);
pinMode(SS, INPUT);
pinMode(MISO, INPUT);
pinMode(MOSI, INPUT);
pinMode(SCK, INPUT);
pinMode(SDA_OLED, INPUT);
pinMode(SCL_OLED, INPUT);
pinMode(RST_OLED, INPUT);
// Set button wakeup if applicable
#ifdef HELTEC_POWER_BUTTON
esp_sleep_enable_ext0_wakeup(BUTTON, LOW);
button.waitForRelease();
#endif
// Set timer wakeup if applicable
if (seconds > 0) {
esp_sleep_enable_timer_wakeup((int64_t)seconds * 1000000);
}
// and off to bed we go
esp_deep_sleep_start();
}