mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
refactor(esp_hw_support): changed reserved interrupt functions to be now defined per SoC
This commit is contained in:
23
components/esp_hw_support/port/esp32c2/esp_cpu_intr.c
Normal file
23
components/esp_hw_support/port/esp32c2/esp_cpu_intr.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_cpu.h"
|
||||
#include "esp_riscv_intr.h"
|
||||
|
||||
void esp_cpu_intr_get_desc(int core_id, int intr_num, esp_cpu_intr_desc_t *intr_desc_ret)
|
||||
{
|
||||
/* On the ESP32-C2, interrupt:
|
||||
* - 1 is for Wi-Fi
|
||||
* - 5 and 8 for Bluetooth
|
||||
* - 6 for "permanently disabled interrupt"
|
||||
*/
|
||||
// [TODO: IDF-2465]
|
||||
const uint32_t rsvd_mask = BIT(1) | BIT(5) | BIT(6) | BIT(8);
|
||||
|
||||
intr_desc_ret->priority = 1;
|
||||
intr_desc_ret->type = ESP_CPU_INTR_TYPE_NA;
|
||||
intr_desc_ret->flags = esp_riscv_intr_num_flags(intr_num, rsvd_mask);
|
||||
}
|
Reference in New Issue
Block a user