mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
ieee802154: support light sleep
This commit is contained in:
@@ -39,8 +39,8 @@ extern "C" {
|
||||
#define REGDMA_IOMUX_LINK(_pri) ((0x12 << 8) | _pri)
|
||||
#define REGDMA_SPIMEM_LINK(_pri) ((0x13 << 8) | _pri)
|
||||
#define REGDMA_SYSTIMER_LINK(_pri) ((0x14 << 8) | _pri)
|
||||
#define REGDMA_BLE_MAC_LINK(_pri) ((0x15 << 8) | _pri)
|
||||
#define REGDMA_MODEM_BT_BB_LINK(_pri) ((0x16 << 8) | _pri)
|
||||
#define REGDMA_MODEM_BTBB_LINK(_pri) ((0x15 << 8) | _pri)
|
||||
#define REGDMA_MODEM_IEEE802154_LINK(_pri) ((0x16 << 8) | _pri)
|
||||
#define REGDMA_MODEM_FE_LINK(_pri) ((0xFF << 8) | _pri)
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -32,9 +32,8 @@ typedef enum sleep_retention_module_bitmap {
|
||||
SLEEP_RETENTION_MODULE_WIFI_MAC = BIT(10),
|
||||
SLEEP_RETENTION_MODULE_WIFI_BB = BIT(11),
|
||||
SLEEP_RETENTION_MODULE_BLE_MAC = BIT(12),
|
||||
SLEEP_RETENTION_MODULE_BLE_BB = BIT(13),
|
||||
SLEEP_RETENTION_MODULE_BT_BB = BIT(13),
|
||||
SLEEP_RETENTION_MODULE_802154_MAC = BIT(14),
|
||||
SLEEP_RETENTION_MODULE_802154_BB = BIT(15),
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
|
||||
@@ -71,21 +71,21 @@ bool IRAM_ATTR clock_domain_pd_allowed(void)
|
||||
const uint32_t modules = sleep_retention_get_modules();
|
||||
const uint32_t mask = (const uint32_t) (
|
||||
SLEEP_RETENTION_MODULE_CLOCK_SYSTEM
|
||||
#if CONFIG_MAC_BB_PD || CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#if CONFIG_MAC_BB_PD || CONFIG_BT_LE_SLEEP_ENABLE || CONFIG_IEEE802154_SLEEP_ENABLE
|
||||
| SLEEP_RETENTION_MODULE_CLOCK_MODEM
|
||||
#endif
|
||||
);
|
||||
return ((modules & mask) == mask);
|
||||
}
|
||||
|
||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP || CONFIG_MAC_BB_PD || CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP || CONFIG_MAC_BB_PD || CONFIG_BT_LE_SLEEP_ENABLE || CONFIG_IEEE802154_SLEEP_ENABLE
|
||||
ESP_SYSTEM_INIT_FN(sleep_clock_startup_init, BIT(0), 106)
|
||||
{
|
||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||
sleep_clock_system_retention_init();
|
||||
#endif
|
||||
|
||||
#if CONFIG_MAC_BB_PD || CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#if CONFIG_MAC_BB_PD || CONFIG_BT_LE_SLEEP_ENABLE || CONFIG_IEEE802154_SLEEP_ENABLE
|
||||
sleep_clock_modem_retention_init();
|
||||
#endif
|
||||
return ESP_OK;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_pmu.h"
|
||||
|
||||
|
||||
static __attribute__((unused)) const char *TAG = "sleep";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user