Zephyr Project API
3.1.0
A Scalable Open Source RTOS
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 */
23
typedef
void (*
isr_handler_t
)(
const
void
*arg);
24
28
void
esp_intr_initialize
(
void
);
29
55
int
esp_intr_alloc
(
int
source,
56
int
flags
,
57
isr_handler_t
handler
,
58
void
*arg,
59
void
**ret_handle);
60
69
int
esp_intr_disable
(
int
source);
70
78
int
esp_intr_enable
(
int
source);
79
86
uint32_t
esp_intr_get_enabled_intmask
(
int
status_mask_number);
87
88
#endif
flags
flags
Definition:
http_parser.h:131
esp_intr_alloc
int esp_intr_alloc(int source, int flags, isr_handler_t handler, void *arg, void **ret_handle)
Allocate an interrupt with the given parameters.
esp_intr_disable
int esp_intr_disable(int source)
Disable the interrupt associated with the source.
esp_intr_get_enabled_intmask
uint32_t esp_intr_get_enabled_intmask(int status_mask_number)
Gets the current enabled interrupts.
isr_handler_t
void(* isr_handler_t)(const void *arg)
Definition:
intc_esp32c3.h:23
esp_intr_initialize
void esp_intr_initialize(void)
Initializes interrupt table to its defaults.
esp_intr_enable
int esp_intr_enable(int source)
Enable the interrupt associated with the source.
stdbool.h
stdint.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:90
handler
static void handler(struct k_timer *timer)
Definition:
main.c:19
include
zephyr
drivers
interrupt_controller
intc_esp32c3.h
Generated on Fri Oct 14 2022 07:25:58 for Zephyr Project API by
1.9.2