Didn't feel the need to make a new branch for this one, but i added some doxygen documentation templates to all of the headers. It's a bit overdue.
31 lines
734 B
C
31 lines
734 B
C
/**
|
|
* @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 <stdint.h>
|
|
|
|
/**
|
|
* @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
|