Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
Loading...
Searching...
No Matches
icu.h
Go to the documentation of this file.
1
12#ifndef ICU_ICU_H
13#define ICU_ICU_H
14
15#include <stdbool.h>
16#include <stdint.h>
17
25typedef struct handler_data_t {
28 void (*handler)(void *private_data);
29
34
44void icu_init(const void *fdt);
45
55bool icu_register_irq(uint32_t irq_num, handler_data_t handler_data);
56
66void icu_unregister_irq(uint32_t irq_num);
67
80void icu_handle_irq(void);
81
82#endif /* ICU_ICU_H */
void icu_handle_irq(void)
Top-level IRQ dispatch entry point.
Definition icu.c:62
bool icu_register_irq(uint32_t irq_num, handler_data_t handler_data)
Register a handler for a hardware interrupt source and enable it.
Definition icu.c:52
void icu_init(const void *fdt)
Initialize the interrupt controller unit.
Definition icu.c:24
void icu_unregister_irq(uint32_t irq_num)
Unregister a handler for a hardware interrupt source and disable it.
Definition icu.c:57
Interrupt handler registration entry.
Definition icu.h:25
void * private_data
Opaque pointer passed to the handler on invocation. Ownership and lifetime are managed by the registe...
Definition icu.h:32
void(* handler)(void *private_data)
Function to invoke when the corresponding INTID fires. NULL indicates no handler is registered for th...
Definition icu.h:28