change(xtensa): Deprecate ".../xtensa_api.h" include path

This commit deprecates the "freertos/xtensa_api.h" and "xtensa/xtensa_api.h"
include paths. Users should use "xtensa_api.h" instead.

- Replace legacy include paths
- Removed some unnecessary includes of "xtensa_api.h"
- Replaced some calls with "esp_cpu_..." equivalents
- Add warning to compatibility header
This commit is contained in:
Darian Leung
2023-10-27 17:41:49 +08:00
parent bf816394d4
commit c2e134b775
30 changed files with 22 additions and 43 deletions

View File

@@ -22,7 +22,6 @@
#include "soc/rtc.h"
#include "esp_private/rtc_clk.h"
#include "hal/wdt_hal.h"
#include "freertos/xtensa_api.h"
#include "soc/soc_memory_layout.h"
#include "esp_private/cache_err_int.h"
@@ -59,7 +58,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
void IRAM_ATTR esp_restart_noos(void)
{
// Disable interrupts
xt_ints_off(0xFFFFFFFF);
esp_cpu_intr_disable(0xFFFFFFFF);
// Enable RTC watchdog for 1 second
wdt_hal_context_t rtc_wdt_ctx;

View File

@@ -22,7 +22,6 @@
#include "soc/syscon_reg.h"
#include "soc/rtc_periph.h"
#include "hal/wdt_hal.h"
#include "freertos/xtensa_api.h"
#include "soc/soc_memory_layout.h"
#include "esp32s2/rom/rtc.h"
@@ -58,7 +57,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
void IRAM_ATTR esp_restart_noos(void)
{
// Disable interrupts
xt_ints_off(0xFFFFFFFF);
esp_cpu_intr_disable(0xFFFFFFFF);
// Enable RTC watchdog for 1 second
wdt_hal_context_t rtc_wdt_ctx;

View File

@@ -21,7 +21,6 @@
#include "soc/syscon_reg.h"
#include "soc/rtc_periph.h"
#include "hal/wdt_hal.h"
#include "freertos/xtensa_api.h"
#include "soc/soc_memory_layout.h"
#include "esp32s3/rom/cache.h"
@@ -66,7 +65,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
void IRAM_ATTR esp_restart_noos(void)
{
// Disable interrupts
xt_ints_off(0xFFFFFFFF);
esp_cpu_intr_disable(0xFFFFFFFF);
// Enable RTC watchdog for 1 second
wdt_hal_context_t rtc_wdt_ctx;

View File

@@ -15,7 +15,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/xtensa_api.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#include "esp_intr_alloc.h"
#include "esp_rom_sys.h"
#include "esp_rom_uart.h"