ca13734bf0
Add kernel (Cortex-M0/M3/M4, Tricore, S32K, RISC-V ports), drivers, middleware (CAN stack, diagnostics, safety), applications, board support, build/test tooling, and documentation.
37 lines
859 B
C
37 lines
859 B
C
/**
|
|
* @file isr.h
|
|
* @brief Interrupt Service Routine management
|
|
*/
|
|
|
|
#ifndef ISR_H
|
|
#define ISR_H
|
|
|
|
#include "kernel.h"
|
|
|
|
/* ISR Types */
|
|
typedef void (*ISRHandler_t)(void);
|
|
|
|
/* ISR Configuration */
|
|
typedef struct {
|
|
uint32_t irq_number;
|
|
ISRHandler_t handler;
|
|
uint8_t priority;
|
|
} ISRConfig_t;
|
|
|
|
/* ISR Functions */
|
|
KernelStatus_t isr_register(uint32_t irq_number, ISRHandler_t handler,
|
|
uint8_t priority);
|
|
KernelStatus_t isr_unregister(uint32_t irq_number);
|
|
KernelStatus_t isr_enable(uint32_t irq_number);
|
|
KernelStatus_t isr_disable(uint32_t irq_number);
|
|
KernelStatus_t isr_set_priority(uint32_t irq_number, uint8_t priority);
|
|
void isr_enter(void);
|
|
void isr_exit(void);
|
|
bool isr_is_in_context(void);
|
|
|
|
/* Critical Section Management */
|
|
void critical_section_enter(void);
|
|
void critical_section_exit(void);
|
|
|
|
#endif /* ISR_H */
|