zephyr/soc/espressif/esp32s3/poweroff.c
Sylvio Alves 561f31bb54 soc: espressif: esp32s3: update to hal_espressif v5.1
Modify and reorganize SoC to meet updated hal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-04-05 13:39:53 +02:00

16 lines
328 B
C

/*
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/sys/poweroff.h>
#include <esp_sleep.h>
void z_sys_poweroff(void)
{
/* Forces RTC domain to be always on */
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
esp_deep_sleep_start();
}