mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-23 03:39:33 +00:00
Merge branch 'refactor/add_alias_name_for_ets_common_api' into 'master'
esp_rom: extract common ets apis into esp_rom_sys.h See merge request espressif/esp-idf!9701
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include "hal/cpu_hal.h"
|
||||
|
||||
#include "esp32s2/dport_access.h"
|
||||
#include "esp32s2/rom/ets_sys.h"
|
||||
#include "esp32s2/rom/ets_sys.h" // for intr_matrix_set
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
|
||||
@@ -41,6 +41,6 @@ int IRAM_ATTR esp_clk_xtal_freq(void)
|
||||
|
||||
void IRAM_ATTR ets_update_cpu_frequency(uint32_t ticks_per_us)
|
||||
{
|
||||
/* Update scale factors used by ets_delay_us */
|
||||
/* Update scale factors used by esp_rom_delay_us */
|
||||
g_ticks_per_us_pro = ticks_per_us;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
|
||||
#include "esp32s2/rom/ets_sys.h"
|
||||
|
||||
#include "soc/cpu.h"
|
||||
#include "soc/dport_reg.h"
|
||||
#include "soc/io_mux_reg.h"
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
// limitations under the License.
|
||||
|
||||
#include "esp32s2/rom/hmac.h"
|
||||
#include "esp32s2/rom/ets_sys.h"
|
||||
#include "esp_hmac.h"
|
||||
#include "esp_crypto_lock.h"
|
||||
|
||||
@@ -38,7 +37,7 @@ esp_err_t esp_hmac_calculate(hmac_key_id_t key_id,
|
||||
|
||||
esp_crypto_dma_lock_release();
|
||||
|
||||
if (hmac_ret != ETS_OK) {
|
||||
if (hmac_ret != 0) {
|
||||
return ESP_FAIL;
|
||||
} else {
|
||||
return ESP_OK;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include "esp_spi_flash.h"
|
||||
#include "esp32s2/rom/cache.h"
|
||||
#include "esp32s2/rom/rtc.h"
|
||||
#include "esp32s2/rom/ets_sys.h"
|
||||
#include "esp_rom_uart.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "soc/cpu.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "soc/spi_periph.h"
|
||||
@@ -286,7 +286,7 @@ static esp_err_t esp_light_sleep_inner(uint32_t pd_flags,
|
||||
// If SPI flash was powered down, wait for it to become ready
|
||||
if (pd_flags & RTC_SLEEP_PD_VDDSDIO) {
|
||||
// Wait for the flash chip to start up
|
||||
ets_delay_us(flash_enable_time_us);
|
||||
esp_rom_delay_us(flash_enable_time_us);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "esp_types.h"
|
||||
#include "esp_log.h"
|
||||
#include "spiram_psram.h"
|
||||
#include "esp32s2/rom/ets_sys.h"
|
||||
#include "esp32s2/rom/spi_flash.h"
|
||||
#include "esp32s2/rom/opi_flash.h"
|
||||
#include "esp32s2/rom/cache.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include "esp32s2/rom/ets_sys.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
@@ -23,7 +23,7 @@ static void test_delay_task(void *p)
|
||||
uint64_t start = ref_clock_get();
|
||||
switch (arg->method) {
|
||||
case 0:
|
||||
ets_delay_us(arg->delay_us);
|
||||
esp_rom_delay_us(arg->delay_us);
|
||||
break;
|
||||
case 1:
|
||||
vTaskDelay(arg->delay_us / portTICK_PERIOD_MS / 1000);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include "unity.h"
|
||||
#include "esp_types.h"
|
||||
#include "esp32s2/rom/ets_sys.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
@@ -234,7 +234,7 @@ typedef struct {
|
||||
void IRAM_ATTR int_handler1(void *arg)
|
||||
{
|
||||
intr_alloc_test_ctx_t *ctx = (intr_alloc_test_ctx_t *)arg;
|
||||
ets_printf("handler 1 called.\n");
|
||||
esp_rom_printf("handler 1 called.\n");
|
||||
if (ctx->flag1) {
|
||||
ctx->flag3 = true;
|
||||
} else {
|
||||
@@ -246,7 +246,7 @@ void IRAM_ATTR int_handler1(void *arg)
|
||||
void IRAM_ATTR int_handler2(void *arg)
|
||||
{
|
||||
intr_alloc_test_ctx_t *ctx = (intr_alloc_test_ctx_t *)arg;
|
||||
ets_printf("handler 2 called.\n");
|
||||
esp_rom_printf("handler 2 called.\n");
|
||||
if (ctx->flag2) {
|
||||
ctx->flag4 = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user