TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
exception.h
Aller à la documentation de ce fichier.
1 
29 #ifndef _EXCEPTION_H_
30 #define _EXCEPTION_H_
31 
32 /* Define des différentes exceptions possibles : */
33 
34 #define EXCEPTION_DIVIDE_ERROR 0
35 #define EXCEPTION_DEBUG 1
36 #define EXCEPTION_NMI_INTERRUPT 2
37 #define EXCEPTION_BREAKPOINT 3
38 #define EXCEPTION_OVERFLOW 4
39 #define EXCEPTION_BOUND_RANGE_EXCEDEED 5
40 #define EXCEPTION_INVALID_OPCODE 6
41 #define EXCEPTION_DEVICE_NOT_AVAILABLE 7
42 #define EXCEPTION_DOUBLE_FAULT 8
43 #define EXCEPTION_COPROCESSOR_SEGMENT_OVERRUN 9
44 #define EXCEPTION_INVALID_TSS 10
45 #define EXCEPTION_SEGMENT_NOT_PRESENT 11
46 #define EXCEPTION_STACK_SEGMENT_FAULT 12
47 #define EXCEPTION_GENERAL_PROTECTION 13
48 #define EXCEPTION_PAGE_FAULT 14
49 #define EXCEPTION_INTEL_RESERVED_1 15
50 #define EXCEPTION_FLOATING_POINT_ERROR 16
51 #define EXCEPTION_ALIGNEMENT_CHECK 17
52 #define EXCEPTION_MACHINE_CHECK 18
53 #define EXCEPTION_INTEL_RESERVED_2 19
54 #define EXCEPTION_INTEL_RESERVED_3 20
55 #define EXCEPTION_INTEL_RESERVED_4 21
56 #define EXCEPTION_INTEL_RESERVED_5 22
57 #define EXCEPTION_INTEL_RESERVED_6 23
58 #define EXCEPTION_INTEL_RESERVED_7 24
59 #define EXCEPTION_INTEL_RESERVED_8 25
60 #define EXCEPTION_INTEL_RESERVED_9 26
61 #define EXCEPTION_INTEL_RESERVED_10 27
62 #define EXCEPTION_INTEL_RESERVED_11 28
63 #define EXCEPTION_INTEL_RESERVED_12 29
64 #define EXCEPTION_INTEL_RESERVED_13 30
65 #define EXCEPTION_INTEL_RESERVED_14 31
67 #ifndef ASM_SOURCE
68 
69 #include <types.h>
70 
74 typedef void (*exception_handler_t)(uint32_t error_id, uint32_t error_code);
75 
84 int exception_set_routine(uint8_t exception_id, exception_handler_t routine);
85 
93 int exception_disable(uint8_t exception_id);
94 
95 #endif
96 
97 #endif
int exception_disable(uint8_t exception_id)
Definition: exception.c:61
int exception_set_routine(uint8_t exception_id, exception_handler_t routine)
Definition: exception.c:40
unsigned char uint8_t
Definition: types.h:34
void(* exception_handler_t)(uint32_t error_id, uint32_t error_code)
Definition: exception.h:74
unsigned long int uint32_t
Definition: types.h:36