/** * @file interrupt_handlers.h * @brief Interrupt Handlers * @details Functions and structs for the C side of handling interrupts. */ #ifndef INTERRUPTHANDLERS_H #define INTERRUPTHANDLERS_H #include /** * @brief */ extern void (*isr_ptrs[])(void); /** * @brief * @details Struct is built "backwards" since it is pushed in this order. */ typedef struct StateSnapshot_s { uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; /**< @brief */ uint32_t interrupt_id, error_code; /**< @brief */ uint32_t eip, cs, eflags; /**< @brief */ } StateSnapshot_t; /** * @brief * @param cpu_state */ void generic_isr_handler(StateSnapshot_t* cpu_state); #endif