// Copyright 2010-2016 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef _ROM_RTC_H_ #define _ROM_RTC_H_ #include "ets_sys.h" #include #include #include "soc/soc.h" #ifdef __cplusplus extern "C" { #endif /** \defgroup rtc_apis, rtc registers and memory related apis * @brief rtc apis */ /** @addtogroup rtc_apis * @{ */ /************************************************************************************** * Note: * * Some Rtc memory and registers are used, in ROM or in internal library. * * Please do not use reserved or used rtc memory or registers. * * * ************************************************************************************* * RTC Memory & Store Register usage ************************************************************************************* * rtc memory addr type size usage * 0x3ff61000(0x50000000) Slow SIZE_CP Co-Processor code/Reset Entry * 0x3ff61000+SIZE_CP Slow 4096-SIZE_CP * 0x3ff62800 Slow 4096 Reserved * * 0x3ff80000(0x400c0000) Fast 8192 deep sleep entry code * ************************************************************************************* * Rtc store registers usage * RTC_CNTL_STORE0_REG * RTC_CNTL_STORE1_REG * RTC_CNTL_STORE2_REG * RTC_CNTL_STORE3_REG * RTC_CNTL_STORE4_REG Reserved * RTC_CNTL_STORE5_REG External Xtal Frequency * RTC_CNTL_STORE6_REG FAST_RTC_MEMORY_ENTRY * RTC_CNTL_STORE7_REG FAST_RTC_MEMORY_CRC ************************************************************************************* */ #define RTC_ENTRY_ADDR_REG RTC_CNTL_STORE6_REG #define RTC_MEMORY_CRC_REG RTC_CNTL_STORE7_REG typedef enum { AWAKE = 0, //