Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
intc_esp32c3.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_ESP_INTR_ALLOC_H__
8#define ZEPHYR_INCLUDE_DRIVERS_ESP_INTR_ALLOC_H__
9
10#include <stdint.h>
11#include <stdbool.h>
12#include <soc.h>
13/*
14 * Interrupt allocation flags - These flags can be used to specify
15 * which interrupt qualities the code calling esp_intr_alloc* needs.
16 */
17
18/* Keep the LEVELx values as they are here; they match up with (1<<level) */
19#define ESP_INTR_FLAG_LEVEL1 (1<<1) /* Accept a Level 1 int vector, lowest priority */
20#define ESP_INTR_FLAG_EDGE (1<<9) /* Edge-triggered interrupt */
21
22/* Function prototype for interrupt handler function */
23typedef void (*isr_handler_t)(const void *arg);
24
29
55int esp_intr_alloc(int source,
56 int flags,
58 void *arg,
59 void **ret_handle);
60
69int esp_intr_disable(int source);
70
78int esp_intr_enable(int source);
79
86uint32_t esp_intr_get_enabled_intmask(int status_mask_number);
87
88#endif
flags
Definition: http_parser.h:131
int esp_intr_alloc(int source, int flags, isr_handler_t handler, void *arg, void **ret_handle)
Allocate an interrupt with the given parameters.
int esp_intr_disable(int source)
Disable the interrupt associated with the source.
uint32_t esp_intr_get_enabled_intmask(int status_mask_number)
Gets the current enabled interrupts.
void(* isr_handler_t)(const void *arg)
Definition: intc_esp32c3.h:23
void esp_intr_initialize(void)
Initializes interrupt table to its defaults.
int esp_intr_enable(int source)
Enable the interrupt associated with the source.
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
static void handler(struct k_timer *timer)
Definition: main.c:19