7#ifndef ZEPHYR_INCLUDE_DRIVERS_ESP_INTR_ALLOC_H__
8#define ZEPHYR_INCLUDE_DRIVERS_ESP_INTR_ALLOC_H__
14#define ESP_INTC_INTS_NUM (32)
23#define ESP_INTR_FLAG_LEVEL1 (1<<1)
24#define ESP_INTR_FLAG_LEVEL2 (1<<2)
25#define ESP_INTR_FLAG_LEVEL3 (1<<3)
26#define ESP_INTR_FLAG_LEVEL4 (1<<4)
27#define ESP_INTR_FLAG_LEVEL5 (1<<5)
28#define ESP_INTR_FLAG_LEVEL6 (1<<6)
29#define ESP_INTR_FLAG_NMI (1<<7)
30#define ESP_INTR_FLAG_SHARED (1<<8)
31#define ESP_INTR_FLAG_EDGE (1<<9)
32#define ESP_INTR_FLAG_IRAM (1<<10)
33#define ESP_INTR_FLAG_INTRDISABLED (1<<11)
36#define ESP_INTR_FLAG_LOWMED (ESP_INTR_FLAG_LEVEL1|ESP_INTR_FLAG_LEVEL2|ESP_INTR_FLAG_LEVEL3)
39#define ESP_INTR_FLAG_HIGH (ESP_INTR_FLAG_LEVEL4|ESP_INTR_FLAG_LEVEL5|ESP_INTR_FLAG_LEVEL6| \
43#define ESP_INTR_FLAG_LEVELMASK (ESP_INTR_FLAG_LEVEL1|ESP_INTR_FLAG_LEVEL2|ESP_INTR_FLAG_LEVEL3| \
44 ESP_INTR_FLAG_LEVEL4|ESP_INTR_FLAG_LEVEL5|ESP_INTR_FLAG_LEVEL6| \
50#define ESP_PRIO_TO_FLAGS(priority) \
51 ((priority) > 0 ? ((1 << (priority)) & ESP_INTR_FLAG_LEVELMASK) : 0)
56#define ESP_INT_FLAGS_CHECK(int_flags) ((int_flags) & ESP_INTR_FLAG_SHARED)
64#define ETS_INTERNAL_TIMER0_INTR_SOURCE -1
65#define ETS_INTERNAL_TIMER1_INTR_SOURCE -2
66#define ETS_INTERNAL_TIMER2_INTR_SOURCE -3
67#define ETS_INTERNAL_SW0_INTR_SOURCE -4
68#define ETS_INTERNAL_SW1_INTR_SOURCE -5
69#define ETS_INTERNAL_PROFILING_INTR_SOURCE -6
int esp_intr_enable(struct intr_handle_data_t *handle)
Enable the interrupt associated with the handle.
int esp_intr_disable(struct intr_handle_data_t *handle)
Disable the interrupt associated with the handle.
int esp_intr_alloc(int source, int flags, intr_handler_t handler, void *arg, struct intr_handle_data_t **ret_handle)
Allocate an interrupt with the given parameters.
int esp_intr_get_intno(struct intr_handle_data_t *handle)
Get the allocated interrupt for a certain handle.
void esp_intr_noniram_disable(void)
Disable interrupts that aren't specifically marked as running from IRAM.
void(* intr_handler_t)(void *arg)
Definition intc_esp32.h:72
int esp_intr_get_cpu(struct intr_handle_data_t *handle)
Get CPU number an interrupt is tied to.
int esp_intr_alloc_intrstatus(int source, int flags, uint32_t intrstatusreg, uint32_t intrstatusmask, intr_handler_t handler, void *arg, struct intr_handle_data_t **ret_handle)
Allocate an interrupt with the given parameters.
int esp_intr_free(struct intr_handle_data_t *handle)
Disable and free an interrupt.
void esp_intr_noniram_enable(void)
Re-enable interrupts disabled by esp_intr_noniram_disable.
int esp_intr_reserve(int intno, int cpu)
Reserve an interrupt to be used outside of this framework.
int esp_intr_mark_shared(int intno, int cpu, bool is_in_iram)
Mark an interrupt as a shared interrupt.
void esp_intr_initialize(void)
Initializes interrupt table to its defaults.
int esp_intr_set_in_iram(struct intr_handle_data_t *handle, bool is_in_iram)
Set the "in IRAM" status of the handler.
flags
Definition parser.h:96
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Interrupt handler associated data structure.
Definition intc_esp32.h:95
struct vector_desc_t * vector_desc
Definition intc_esp32.h:96
struct shared_vector_desc_t * shared_vector_desc
Definition intc_esp32.h:97
Definition intc_esp32.h:74
int disabled
Definition intc_esp32.h:75
void * arg
Definition intc_esp32.h:80
uint32_t statusmask
Definition intc_esp32.h:78
intr_handler_t isr
Definition intc_esp32.h:79
volatile uint32_t * statusreg
Definition intc_esp32.h:77
struct shared_vector_desc_t * next
Definition intc_esp32.h:81
int source
Definition intc_esp32.h:76
Definition intc_esp32.h:85
int flags
Definition intc_esp32.h:86
struct vector_desc_t * next
Definition intc_esp32.h:91
unsigned int intno
Definition intc_esp32.h:88
unsigned int cpu
Definition intc_esp32.h:87
int source
Definition intc_esp32.h:89
struct shared_vector_desc_t * shared_vec_info
Definition intc_esp32.h:90