-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathirq_ctrl.h
More file actions
53 lines (42 loc) · 1.29 KB
/
irq_ctrl.h
File metadata and controls
53 lines (42 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Copyright (c) 2017 Oticon A/S
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief API to the native simulator - native interrupt controller
*/
#ifndef NATIVE_SIMULATOR_NATIVE_SRC_IRQ_CTRL_H
#define NATIVE_SIMULATOR_NATIVE_SRC_IRQ_CTRL_H
#include <stdint.h>
/* Default to 32 interrupts */
#ifndef N_IRQS
#define N_IRQS 32
#endif
#ifdef __cplusplus
extern "C" {
#endif
void hw_irq_ctrl_set_cur_prio(int new);
int hw_irq_ctrl_get_cur_prio(void);
void hw_irq_ctrl_prio_set(unsigned int irq, unsigned int prio);
uint8_t hw_irq_ctrl_get_prio(unsigned int irq);
int hw_irq_ctrl_get_highest_prio_irq(void);
uint32_t hw_irq_ctrl_get_current_lock(void);
uint32_t hw_irq_ctrl_change_lock(uint32_t new_lock);
// This function is only supported with <= 64 interrupts.
#if N_IRQS <= 64
uint64_t hw_irq_ctrl_get_irq_status(void);
#endif
void hw_irq_ctrl_disable_irq(unsigned int irq);
int hw_irq_ctrl_is_irq_enabled(unsigned int irq);
void hw_irq_ctrl_clear_irq(unsigned int irq);
void hw_irq_ctrl_enable_irq(unsigned int irq);
void hw_irq_ctrl_set_irq(unsigned int irq);
void hw_irq_ctrl_raise_im(unsigned int irq);
void hw_irq_ctrl_raise_im_from_sw(unsigned int irq);
#ifdef __cplusplus
}
#endif
#endif /* NATIVE_SIMULATOR_NATIVE_SRC_IRQ_CTRL_H */