1 /* 2 * Copyright 2002-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 6 * Distributed under the terms of the NewOS License. 7 */ 8 #ifndef KERNEL_ARCH_INT_H 9 #define KERNEL_ARCH_INT_H 10 11 12 // config flags for arch_int_configure_io_interrupt() 13 #define B_EDGE_TRIGGERED 1 14 #define B_LEVEL_TRIGGERED 2 15 #define B_LOW_ACTIVE_POLARITY 4 16 #define B_HIGH_ACTIVE_POLARITY 8 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 struct kernel_args; 23 24 status_t arch_int_init(struct kernel_args *args); 25 status_t arch_int_init_post_vm(struct kernel_args *args); 26 status_t arch_int_init_post_device_manager(struct kernel_args *args); 27 28 void arch_int_enable_interrupts(void); 29 int arch_int_disable_interrupts(void); 30 void arch_int_restore_interrupts(int oldstate); 31 void arch_int_enable_io_interrupt(int irq); 32 void arch_int_disable_io_interrupt(int irq); 33 void arch_int_configure_io_interrupt(int irq, uint32 config); 34 bool arch_int_are_interrupts_enabled(void); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 41 #include <arch_int.h> 42 43 44 #endif /* KERNEL_ARCH_INT_H */ 45