4 * @brief ISR Manager, managing the interrupt service routine allocations
8 * @copyright Copyright (c) 2022
11 #ifndef __LUNAIX_ISRM_H
12 #define __LUNAIX_ISRM_H
14 #include <lunaix/types.h>
15 #include <lunaix/pcontext.h>
17 typedef void (*isr_cb)(const isr_param*);
23 * @brief Release a iv resource
31 * @brief Allocate an iv resource for os services
36 isrm_ivosalloc(isr_cb handler);
39 * @brief Allocate an iv resource for external events
44 isrm_ivexalloc(isr_cb handler);
47 * @brief Bind a given irq and associated handler to an iv
49 * @param iv iv allocated by system
52 isrm_bindirq(int irq, isr_cb irq_handler);
55 * @brief Bind given iv with it's associated handler
61 isrm_bindiv(int iv, isr_cb handler);
64 * @brief Get the handler associated with the given iv
73 isrm_get_payload(const isr_param*);
76 isrm_set_payload(int iv, ptr_t);
78 #endif /* __LUNAIX_ISRM_H */