SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
sys-intc.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+ */
2
3#ifndef _SYS_INTC_H_
4#define _SYS_INTC_H_
5
6#include <io.h>
7#include <stdarg.h>
8#include <stdbool.h>
9#include <stddef.h>
10#include <stdint.h>
11#include <types.h>
12
13#include <common.h>
14#include <log.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif// __cplusplus
19
26typedef struct _irq_handler {
27 void *data;
28 void (*func)(void *data);
30
36typedef void(interrupt_handler_t)(void *);
37
45void irq_install_handler(int irq, interrupt_handler_t handle_irq, void *data);
46
52void irq_free_handler(int irq);
53
60int irq_enable(int irq_no);
61
68int irq_disable(int irq_no);
69
70#ifdef __cplusplus
71}
72#endif// __cplusplus
73
74#endif// _SYS_INTC_H_
Structure for IRQ handler.
Definition sys-intc.h:26
void * data
Definition sys-intc.h:27
void(* func)(void *data)
Definition sys-intc.h:28
void irq_install_handler(int irq, interrupt_handler_t handle_irq, void *data)
Installs a handler for the specified IRQ.
Definition sys-clic.c:187
int irq_disable(int irq_no)
Disables the specified IRQ.
Definition sys-clic.c:178
int irq_enable(int irq_no)
Enables the specified IRQ.
Definition sys-clic.c:169
struct _irq_handler irq_handler_t
Structure for IRQ handler.
void irq_free_handler(int irq)
Frees the resources associated with the specified IRQ handler.
Definition sys-clic.c:161
void() interrupt_handler_t(void *)
Type definition for interrupt handler function.
Definition sys-intc.h:36